css基础知识二

1. 如果两个属性都用同一套css属性,那么可以合起来,用,分隔。eg:

th,td
{
border:1px solid black;
}

2. 如果是要求只在某个节点的特定节点里使用css选择器,那么用空格。eg:

nav ul {
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}   nav节点下的ul节点才使用这个

3. 如果要鼠标悬停效果,使用hover。eg:

a:hover{color:red;text-decoration:none}  当鼠标放在超链接上,字变红

posted on 2017-02-15 16:52  在天成象  阅读(114)  评论(0)    收藏  举报