2-7作业提交

来源:2-7 编程练习

qq_慕斯7214945

2020-08-23 16:37:00

<!DOCTYPE html>

<html>

    <head>

        <meta charset="UTF-8">

        <title>background-origin</title>

        <style type="text/css">

            div{

            width: 300px;

            height: 150px;

            background-image: url("http://climg.mukewang.com/582c342b0001fd6507000210.jpg") no-repeat;

            border:10px solid rgba(0, 0, 255, 0.2);

            background-clip: content-box;

        }

        div:hover{

            background-image: url("http://climg.mukewang.com/582c34220001091605000150.jpg") no-repeat 10px 10px;

            background-origin: content-box;

        }

        </style>

    </head>

    <body>

        <div></div>

    </body>

</html>


写回答

1回答

好帮手慕码

2020-08-23

同学你好,效果无法显示,代码中问题如下:

http://img.mukewang.com/climg/5f4235cb0978dbbd09890438.jpg

background-image属性只表示设置背景图片样式,因此后面添加no-repeat的话,该属性会不生效。

如果我的回答帮到了你,欢迎采纳,祝学习愉快~

0

0 学习 · 40143 问题

查看课程