在body
標記中,我添加了一個background-image
。但圖像重複4次。如何解決只顯示一次?Html身體背景圖片
HTML代碼:
<body background="image.png"></body>
CSS代碼:現在習慣了這種
body{background:url('image.png') no-repeat};
body{
background-image : no-repeat;
}
在body
標記中,我添加了一個background-image
。但圖像重複4次。如何解決只顯示一次?Html身體背景圖片
HTML代碼:
<body background="image.png"></body>
CSS代碼:現在習慣了這種
body{background:url('image.png') no-repeat};
body{
background-image : no-repeat;
}
喜還是該
body{
background-image:url('image.png'); // for your body background
background-repeat: no-repeat; // for your body background repeat
}
它的背景重複 的身體從身體
body{
background-repeat: no-repeat;
}
去除背景和運用你的CSS像下面。
body
{
background-image:url('image.png');
background-repeat:no-repeat;
}
您可以使用style屬性添加樣式身體標記:
<body style="background-image:url('image.png');background-repeat: no-repeat;">
html {
background: url(http://p1.pichost.me/i/64/1886374.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
<html>
<body>
</body>
</html>
請嘗試在這裏發佈您的問題之前找到自己的解決辦法,如果你我猜這需要幾秒鐘才能找到這個問題的答案! – Mohammad