样式 背景 字体 链接 边距

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style type="text/css">
    *{ margin:0px auto; padding:0px;}
    <!--外边界      内边界都是零 除了自己设置的之外 凹偷auto-->
    #a1{ 100px; height:30px; background-color:#60c; color:white; text-decoration:none; color: #000;}
    #d1{
            300px;
            height:300px;
            background-color:#60f;
            color:#FFF;
            text-align:center;
            vertical-align:middle;/*//垂直居中   要配合行高*/
            line-height:300px;/*//行高*/
    }    
    
    #anniu{
        104px;
        height:40px;
        background-color:#38f;
        font-size:16px;
        text-align:center;
        vertical-align:middle;
        line-height:40px;
        }
    #wai{ 300px;
        height:300px;
        background-color:#f00;
        }
    #nei{ float:left;
        190px;
        height:160px;
        background-color:#30f;
        margin:20px 30px 20px 30px;
        padding:40px 0px 0px 10px;
        }
    #li{ 100px;
        height:100px;
        background-color:#0F0;
        }
    </style>
    
    </head>
    
    <body>
        <div style=" 400px; height:500px; background-color:#60F; background-image:url(../../%E3%80%8A%E6%A2%A6%E5%B9%BB%E8%A5%BF%E6%B8%B8%E3%80%8B%E7%94%B5%E8%84%91%E7%89%88%E5%AE%98%E6%96%B9%E7%BD%91%E7%AB%99%20-%20%E4%B8%AD%E5%9B%BD%E7%AC%AC%E4%B8%80%E7%BD%91%E6%B8%B8%20%E7%BD%91%E6%98%93%E8%A5%BF%E6%B8%B8%E9%A2%98%E6%9D%90%E6%89%9B%E9%BC%8E%E4%B9%8B%E4%BD%9C_files/dialog-kv_0eb55b1.jpg); background-repeat:no-repeat; background-position: right top; background-size:300px 500px">测试文字</div>
        <div style="font-family: 微软雅黑; font-size:36px; font-weight:bold; font-style:italic; color:#f00; text-decoration: overline">控制字体                                                </div>
          <a id="a1" href="http://www.baidu.com">超链接 </a> 
       <!-- <!--<center>!--//sen te让图片居中-->
        <div id="d1">测试</div>
        <!--</center>-->
        <br />
        <div id="anniu">百度一下</div>
        <br />
        
        <p style="text-indent:30px;">缩进像素段落p大幅度萨芬第三方第三方第三方第三方第三方斯蒂芬斯蒂芬第三方第三方第三方第三方第三方大幅度萨芬第三方第三方地方都是地方所得税放松放松放松法第三方斯蒂芬第三方第三方撒睡电热毯和田玉已经很高技能高耗能</p>
        
        <div id="wai">
        
            <div id="nei">
            <div id="li"></div>
            </div>
   
        </div>
         
    </body>
</html>
原文地址:https://www.cnblogs.com/aqxss/p/6052877.html