Blogger Information
Blog 40
fans 0
comment 1
visits 24651
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
第6章 1216-细说选择器优先级与属性简写,学习心得、笔记
努力工作--周工--Robin
Original
439 people have browsed it

今天所学心得、笔记

1、实例演示选择器组合实现优先级提权方式;

  1. div {
  2. background-color: violet;
  3. }
  4. body div {
  5. background-color: pink;
  6. }
  7. .container {
  8. background-color: skyblue;
  9. }
  10. div.container {
  11. background-color: lightcoral;
  12. }
  13. #box {
  14. background-color: lightblue;
  15. }
  16. html body div#box.container {
  17. width: 200px;
  18. height: 200px;
  19. }

2、实例演示字体与字体图标;

  1. <!--引入字体文件-->
  2. <link rel="stylesheet" href="./iconFont/iconfont.css">
  3. <!--设置字体文件属性-->
  4. <style>
  5. .iconfont {
  6. font-size: 50px;
  7. color: lightblue;
  8. }
  9. </style>
  10. <!--设置字体图标;-->
  11. <span class="iconfont icon-ziliaoshouce"></span>
  12. <span class="iconfont icon-jisuanqilishuai"></span>
  13. <span class="iconfont icon-shezhi"></span>
  14. <span class="iconfont icon-dianhua-yuankuang"></span>
  15. <span class="iconfont icon-kuaidiyuan"></span>

字体图标效果截图

" class="reference-link">

3、例演示盒模型常用属性的缩写方案

  1. /*背景设置,缩写*/
  2. div {
  3. background: url("new.jpg") top no-repeat;
  4. background-size: 200px;
  5. }
  6. /*内边距设置,缩写*/
  7. div {
  8. /*上、右、下、左,内边距*/
  9. padding: 10px 20px 15px 30px;
  10. /*上、左右、下,内边距*/
  11. padding: 10px 20px 15px;
  12. /*上下、左右,内边距*/
  13. padding: 10px 20px;
  14. /*上下左右,内边距*/
  15. padding: 10px;
  16. }
  17. /*外边距设置,缩写*/
  18. div {
  19. /*上、右、下、左,内边距*/
  20. margin: 10px 20px 15px 30px;
  21. /*上、左右、下,内边距*/
  22. margin: 10px 20px 15px;
  23. /*上下、左右,内边距*/
  24. margin: 10px 20px;
  25. /*上下左右,内边距*/
  26. margin: 10px;
  27. }

Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments