zoukankan      html  css  js  c++  java
  • css background实例

    <!DOCTYPE html>  
    <html>  
    <head>  
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <title>background</title>  
        <style type="text/css">
            .my-style {
                 100%;
                height: 200px;
                background-image: url("http://www.runoob.com/try/demo_source/gradient2.png");
                background-repeat: repeat-x;
                border: 1px solid #ddd;
                margin-bottom: 5px;
            }
            .my-style2 {
                 100%;
                height: 400px;
                background-image: url("http://www.runoob.com/try/demo_source/img_tree.png");
                background-repeat: no-repeat;
                background-position: right top;
                border: 1px solid #ddd;
                margin-bottom: 5px;
            }
            .my-style3 {
                 100%;
                height: 400px;
                background: #8cd6f5 url("http://www.runoob.com/try/demo_source/img_tree.png") no-repeat center bottom;
                border: 1px solid #ddd;
                margin-bottom: 5px;
            }    
            .my-style4 {
                 100%;
                height: 400px;
                background: #8cf599 url("http://www.runoob.com/try/demo_source/img_tree.png") no-repeat center bottom;
                background-size: 100px 250px;
                background-position-y: 20px;
                border: 1px solid #ddd;
                margin-bottom: 5px;
            }              
        </style>
    </head>  
    <body>
        <div class="my-style"></div>
        <div class="my-style2"></div>
        <div class="my-style3"></div>
        <div class="my-style4"></div>
    </body>  
    </html>






  • 相关阅读:
    2016/11/10 kettle概述
    2016/11/07 线程的创建和启动
    python3 pip使用报错
    django建表报错
    django学习
    前端系列
    git使用标准
    我的Python之路
    nginx优化
    python安装包的时候报错
  • 原文地址:https://www.cnblogs.com/xutongbao/p/9924940.html
Copyright © 2011-2022 走看看