博客列表 >1210用iframe实现简易后台+CSS优先级

1210用iframe实现简易后台+CSS优先级

一米互联
一米互联原创
2020年12月12日 16:53:12444浏览
  1. <!--ifram实现简易后台-->
  2. <div class="top">后台管理系统</div>
  3. <div class="left">
  4. <a href="http://www.baidu.com" target="content">百度</a>
  5. <a href="http://www.taobao.com" target="content">淘宝</a>
  6. <a href="https://www.jd.com" target="content">京东</a>
  7. <a href="https://www.12306.cn" target="content">12306</a>
  8. <a href="http://www.qq.com" target="content">QQ</a>
  9. </div>
  10. <div class="right">
  11. <iframe srcdoc="请点击左侧按钮" name="content"></iframe>
  12. </div>
  1. .top{
  2. height: 40px;
  3. background-color: aquamarine;
  4. border: 1px solid #898989;
  5. }
  6. .left{
  7. width: 20%;
  8. background-color: blanchedalmond;
  9. float: left;
  10. }
  11. .left a{
  12. display:block;
  13. height: 30px;
  14. border: 1px solid #898989;
  15. text-align: center;
  16. color: black;
  17. text-decoration: none;
  18. line-height: 30px;
  19. }
  20. .right iframe{
  21. border: none;
  22. width: 79.6%;
  23. border: 1px solid black;
  24. height: 158px;
  25. }

  1. <!--理解css优先级,并实例图示演示元素样式的四个来源-->
  2. <span id="one" class="one" style="color:black;">这是一段内容</span>
  3. <style>
  4. span{
  5. color: red;
  6. }
  7. .one{
  8. color: blue;
  9. }
  10. #one{
  11. color: pink;
  12. }
  13. </style>
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议