Cha*_*aos 2 html css tags space
所以我正在 Dreamworks cc 中制作一个网站,但我的图像和 div 标签之间存在很大差距。看图片:
\n\n\n\n好的,现在这是我的索引代码:
\n\n<!doctype html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>Home</title>\n<link href="style/style.css" rel="stylesheet" type="text/css">\n</head>\n\n<body>\n<div class="container" style="">\n <div class="logo"><img src="images/header.png" width="990" height="256" alt=""/></div>\n <div class="menu">\n <div class="menubutt1" style="cursor:pointer;" onclick="location.href=\'./index.html\'">Home</div>\n <div class="menubutt2" style="cursor:pointer;" onclick="location.href=\'./aboutus.html\'">About Us</div>\n <div class="menubutt3" style="cursor:pointer;" onclick="location.href=\'./games.html\'">Game Info</div>\n <div class="menubutt4" style="cursor:pointer;" onclick="location.href=\'./forms.html\'">Forms</div>\n <div class="menubutt5" style="cursor:pointer;" onclick="location.href=\'./gallery.html\'">Gallery</div>\n <div class="menubutt6" style="cursor:pointer;" onclick="location.href=\'./contactus.html\'">Contact Us</div>\n </div>\n\n <div class="content">stuff</div>\n <div class="footer"><br><strong>\xc2\xa9</strong>2013 Trey Zanone</div>\n</div>\n\n\n</body>\n</html>\nRun Code Online (Sandbox Code Playgroud)\n\n这是我的 css 样式表:
\n\n@charset "utf-8";.container {\n background-image: none;\n width: 990px;\n margin-right: auto;\n -webkit-transition: all;\n -moz-transition: all;\n -ms-transition: all;\n -o-transition: all;\n transition: all;\n margin-left: auto;\n padding: 0px;\n margin-top: 0px;\n margin-bottom: 0px;\n}\n.content {\n width: 990px;\n margin-right: auto;\n margin-left: auto;\n padding: 30px;\n background-image: url(../images/body.png);\n background-repeat: repeat-y;\n margin-top: 0px;\n margin-bottom: 0px;\n}\n.footer {\n background-image: url(../images/footer.png);\n width: 990px;\n height: 100px;\n text-align: center;\n margin: 0px;\n padding: 0px;\n}\nbody {\n background-image: url(../images/background.png);\n background-repeat: repeat-x;\n margin-top: 0px;\n}\nimg {\n border:0;\n margin:0\n}\n.logo {\n background-image: none;\n padding: 0px;\n margin-top: 0px;\n margin-right: auto;\n margin-bottom: 0px;\n margin-left: auto;\n}\n.menu {\n height: 48px;\n width: 934px;\n margin-top: 0px;\n margin-right: auto;\n margin-bottom: 0px;\n margin-left: auto;\n}\nRun Code Online (Sandbox Code Playgroud)\n\n我删除了菜单按钮规则,因为它又长又无关紧要。
\n小智 7
在你的<img>:
img {
border: 0;
margin: 0;
display: block;
}
Run Code Online (Sandbox Code Playgroud)