老师,我的代码有什么问题吗
来源:2-7 编程练习
慕慕026205
2019-05-21 11:43:45
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>background-origin</title>
<style type="text/css">
*{margin:0;padding:0; border:0;}
div{
width:300px;
height:150px;
border:20px solid #abcdef;
padding:20px;
background-image:url(http://climg.mukewang.com/582c342b0001fd6507000210.jpg) no-repeat;
background-clip:padding-box;
}
div:hover{
background-image:url(http://climg.mukewang.com/582c34220001091605000150.jpg);
background-image:no-repeat 10px 10px;
background-origin:content-box;
background-clip:border-box;
}
</style>
</head>
<body>
<div></div>
</body>
</html>1回答
好帮手慕言
2019-05-21
同学你好!有问题。
(1)所有的符号都是输入法为英文状态下的。

(2)background-image属性是为元素设置背景图像,如果要设置图像不平铺的话,使用background-repead设置。

如果帮助到了你,欢迎采纳~
相似问题
回答 3
回答 1