时间:2021-07-01 10:21:17 帮助过:48人阅读

句法:
element {
margin-right:value;
}示例:
<!DOCTYPE html>
<html>
<head>
<style>
nav a {
display: inline-block;
margin-right:-4px;
background: green;
color:white;
font-weight:bold;
text-decoration:none;
}
h1 {
color:green;
}
body {
text-align:center;
}
</style>
</head>
<body>
<h1>GeeksforGeeks</h1>
<h2>margin-right:-4px;</h2>
<nav>
<a href="#"> geeks </a>
<a href="#"> for </a>
<a href="#"> geeks </a>
</nav>
</body>
</html>输出结果如下:

支持的浏览器: CSS margin属性支持的浏览器如下所示:
Apple Safari 3.1
谷歌Chrome 4.0
Firefox 3.0
Opera 7.6
Internet Explorer 8.0
以上就是如何删除内联块元素之间的空格的详细内容,更多请关注Gxl网其它相关文章!