CSS3: background: -webkit-linear-gradient(bottom,rgba(127,255,0,0.2),rgba(0 ,205, 0, 1));
background: -o-linear-gradient(red,green);
background: -moz-linear-gradient(bottom,rgba(127,255,0,0.2),rgba(0, 205, 0 ,1));
background: linear-gradient(to bottom,rgba(127,255,0,0.2),rgba(0, 205 ,0 ,1));
background: -o-linear-gradient(red,green);
background: -moz-linear-gradient(bottom,rgba(127,255,0,0.2),rgba(0, 205, 0 ,1));
background: linear-gradient(to bottom,rgba(127,255,0,0.2),rgba(0, 205 ,0 ,1));
2017-04-09
其實可以 ul li:hover{background-color:#666; }
ul li:hover a{color: #fff;} 簡單點
ul li:hover a{color: #fff;} 簡單點
2017-04-07
引用之前章節別人實現的一個更為簡單的方法,即用toggle()來實現:
$("li").has("ul").hover(function() {
$(this).children("ul").toggle();
});
$("li").has("ul").hover(function() {
$(this).children("ul").toggle();
});
2017-03-30
導航里面的li不是居中顯示的,看著很不爽,第一ul li里面的text-align:center其實是無效的,因為li是浮動的,且ul是沒有高度的。我們可以把ul設為display:inline-block,再在它的父元素也就是.nav中設置text-align:center就好了,這樣其實是讓ul整塊居中了,但效果也是我們想要的。
2017-03-29
最新回答 / Mr_Zheng_0
這個只是個參數,是隨便取的,你如果不理解可以取成obj等名稱的參數,這里用li,只是便于你去理解這個參數代表什么,這里li指的就是<li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">課程大廳</a>這里的li
2017-03-29