css怎么设置图片背景


当前第2页 返回上一页

示例:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

<!DOCTYPE html>

<html>

    <head>

        <meta charset="UTF-8">

        <title>背景图片设置</title>

        <style>

            .demo{

                position:fixed;

                top: 0;

                left: 0;

                width:100%;

                height:100%;

                min-width: 1000px;

                z-index:-10;

                zoom: 1;

                background-color: #fff;

                background: url(img/1.jpg);

                background-repeat: no-repeat;

                background-size: cover;

                -webkit-background-size: cover;

                -o-background-size: cover;

                background-position: center 0;

            }

        </style>

    </head>

    <body>

        <div class="demo"></div>

    </body>

</html>

效果图:

3.png

更多编程相关知识,请访问:编程入门!!

以上就是css怎么设置图片背景的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

css实现3d切换功能的代码示例

css权重是什么?css权重的介绍

关于html和css绘制三角形图标的方法

css怎么设置鼠标变背景

css怎么设置tr间距

css代码如何居中

css padding什么意思

css a不换行怎么设置

css如何垂直对齐容器中的元素

css中的“>”是什么意思

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...