试过的边界:无;没有用。
#header .bg
{
float: right;
max-width: 100%;
max-height: 100%;
border: none;
}
现在是 html...
<body>
<div id="header">
<img class="bg" src="http://hdwallpapermania.com/wp-content/uploads/2014/04/Beautiful- Beach-Landscape-HD.png">
</div>
最佳答案
为什么不使用:
<div id="header" style="background-size:cover; background-image:url(http://hdwallpapermania.com/wp-content/uploads/2014/04/Beautiful-Beach-Landscape-HD.png);">
相反? 或者,甚至更好:
<div id="header"></div>
CSS:
#header {
background-size: cover;
background-image: url(http://hdwallpapermania.com/wp-content/uploads/2014/04/Beautiful-Beach-Landscape-HD.png);
}
关于html - 从图像中删除白色边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24320173/