码迷,mamicode.com
首页 > 其他好文 > 详细

11.30

时间:2016-12-01 04:06:07      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:name   列表   utf-8   分享   ansi   order   css   浮动   lin   

<!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" xml:lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>网页标题</title>
    <meta name="keywords" content="关键字列表" />
    <meta name="description" content="网页描述" />
    <link rel="stylesheet" type="text/css" href="" />
    <style type="text/css">
    /*利用类选择器:有class属性的标签*/
    .now{
        border:1px solid #f00;
        height:200px;
        width:300px;
        background-color:#ff9933;
        /*向左浮动*/
        float:left;
    }
    .box{
        border:1px solid #0f0;
        width:500px;
        height:300px;
        /*利用外边距给盒子居中*/
        margin-left:auto;
        margin-right:auto;
    }
    img{
        /*向右浮动*/
        float:right;
    }
    /*清除浮动*/
    .nos{
        clear:both;
    }
    </style>
    <script type="text/javascript"></script>
</head>
<body>
    <div class=‘box‘>
        <div class=‘now‘>接电话疯狂老师打哈了咖啡还撒了点</div>
        <img src=‘jd2.png‘/>
        <!--清除浮动:设置一个空盒子-->
        <div class=‘nos‘><div>
    </div>
</body>
</html>

技术分享

 

11.30

标签:name   列表   utf-8   分享   ansi   order   css   浮动   lin   

原文地址:http://www.cnblogs.com/1135721684-qq/p/6120383.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!