麻烦老师批改,谢谢

来源:2-7 编程练习

慕九州1456286

2019-08-05 21:31:48

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>background-origin</title>
    <style type="text/css">
        div{
            border: 30px solid rgba(255,0,0,.2);
            width: 300px;
            height: 100px;
            margin: 10% auto;
            padding: 20px;
            background-image: url("http://climg.mukewang.com/582c342b0001fd6507000210.jpg");
            background-repeat: no-repeat;
            background-clip: padding-box;
        }
        div:hover{
            background-image: url(http://climg.mukewang.com/582c34220001091605000150.jpg);
            background-repeat: no-repeat;
            background-position: 10px 10px;
            background-clip: border-box;
            background-origin: content-box;

        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>

写回答

1回答

好帮手慕码

2019-08-06

同学你好!

代码效果实现的是可以的哦

如果帮助到了你 欢迎采纳 祝学习愉快~

0

0 学习 · 40143 问题

查看课程