Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 727aac7

Browse files
committed
修改缩写和分拆描述
修改缩写和分拆描述
1 parent 1841d9b commit 727aac7

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

README.md

+28-6
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,16 @@ body{
881881
}
882882
```
883883

884+
要避免错误的覆盖:
885+
886+
```
887+
.m-detail .info{
888+
   font: 14px sans;
889+
}
890+
```
891+
892+
> 如果你只是想改字号和字体,然后写成了上面这样,这是错误的写法,因为 `font` 复合属性里的其他属性将会被重置为 user agent 的默认值,比如 `font-weight` 就会被重置为 `normal`
893+
884894
推荐:
885895

886896
```
@@ -931,7 +941,9 @@ body{
931941
&-hd{
932942
padding: 5px 10px;
933943
background: #eee;
934-
.title{background: #eee;}
944+
.title{
945+
background: #eee;
946+
}
935947
}
936948
&-bd{
937949
padding: 10px;
@@ -942,7 +954,9 @@ body{
942954
}
943955
&-ft{
944956
text-align: center;
945-
.more{color: blue;}
957+
.more{
958+
color: blue;
959+
}
946960
}
947961
}
948962
}
@@ -957,14 +971,22 @@ body{
957971
padding: 5px 10px;
958972
background: #eee;
959973
}
960-
.m-detail-hd .title{ background: #eee; }
961-
.m-detail-bd{ padding: 10px; }
974+
.m-detail-hd .title{
975+
background: #eee;
976+
}
977+
.m-detail-bd{
978+
padding: 10px;
979+
}
962980
.m-detail-bd .info{
963981
font-size: 14px;
964982
text-indent: 2em;
965983
}
966-
.m-detail-ft{ text-align: center; }
967-
.m-detail-ft .more{ color: blue; }
984+
.m-detail-ft{
985+
text-align: center;
986+
}
987+
.m-detail-ft .more{
988+
color: blue;
989+
}
968990

969991
> 任何超过3级的选择器,需要思考是否必要,是否有无歧义的,能唯一命中的更简短的写法
970992

0 commit comments

Comments
 (0)