博客列表 >0703作业:iframe标签练习、CSS优先级认识和盒子概念了解

0703作业:iframe标签练习、CSS优先级认识和盒子概念了解

四爽的博客
四爽的博客原创
2019年07月04日 02:10:35562浏览

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>iframe</title>
    <style>
        *{margin:0; padding:0}
        ul,li{list-style:none}
        body{ font-family:"微软雅黑"; font-size:14px; line-height:24px; font-weight:400}
        #box{ margin:50px auto; width:1000px; height:600px; border:1px solid #666; overflow:hidden}
        .box-left{ float:left; width:200px; height:600px; overflow:hidden; background:#eee}
        .box-left ul{ width:160px; margin: 40px;}
        .box-left ul li{
            width: 120px;
            height: 30px;
            line-height:30px;
            border-bottom:1px solid #222;
            border-right:1px solid #222;
            border-top:1px solid #aaa;
            border-left:1px solid #aaa;
            background:#888
        }
        .box-left ul li:hover{
            width: 120px;
            height: 30px;
            line-height:30px;
            border-bottom:1px solid #aaa;
            border-right:1px solid #aaa;
            border-top:1px solid #222;
            border-left:1px solid #222;
            background:#888
        }
        .box-left li a{
            text-align:center;
            display:block;
            color:#fff;
            text-decoration: none;
        }
        .box-left li a:hover{
            text-decoration:underline;
            color:#ffff00;
        }
        #miframe{
            width: 795px;
            height: 598px;
            overflow:hidden;
        }
    </style>



</head>
<body>

<div id="box">
    <div class="box-left">
       <ul>
           <li><a href="http://www.baidu.com" target="miframe" > 百度</a></li>
           <li><a href="http://www.qq.com" target="miframe" >腾讯</a></li>
           <li><a href="http://www.163.com" target="miframe" >网易</a></li>
           <li><a href="http://www.sina.com.cn" target="miframe" >新浪</a></li>
       </ul>

    </div>
    <iframe id="miframe" name="miframe" src="http://www.baidu.com">
    </iframe>

</div>
<br/><br/><br/><br/>
<p>css优先级:内联最高,其次内部,最后外联</p>
<p>选择器优先级:id>class(越后越优先)>tag</p>
<p>margin,padding:第一位是上,第二位是右,第三是下,第四是左(按顺时针排序)</p>

运行实例 »

点击 "运行实例" 按钮查看在线实例

上一条:0703作业下一条:7月3日作业
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议