說點(diǎn)總體的感受吧,這門課程對(duì)我最大的啟發(fā)是使用:hover偽類來實(shí)現(xiàn)一些操作,可以設(shè)定該偽類從而對(duì)元素以及子孫元素實(shí)現(xiàn)樣式改變。今天就寫了幾個(gè)效果:hover時(shí)opacity改變(以前opacity沒怎么用過,今天一用解決了三的地方的問題),hover時(shí)圖片大小改變,hover時(shí)元素的顯示與消失。至于后面的js,稍微接觸過的人其實(shí)不用聽這節(jié)課。很感謝授課老師。順便想明白了那個(gè)聚劃算的設(shè)計(jì),hover時(shí)改變width。
2015-08-25
用jq:
$(document).ready(function(){
$('#picList div').mouseover(function(){
$(this).find('a').attr('top',0);
});
mouseout類似
})
$(document).ready(function(){
$('#picList div').mouseover(function(){
$(this).find('a').attr('top',0);
});
mouseout類似
})
2015-08-24
.try li span{
color:#fff;
font-size: 16px;
position: relative;
bottom: 39px;
width: 225px;
height: 34px;
line-height: 40px;
filter:alpha(opacity=50);
-moz-opacity:0.5;
opacity:0.5;
-khtml-opacity:0.5;
background-color: #000;
text-align: left;
display: none;
}
color:#fff;
font-size: 16px;
position: relative;
bottom: 39px;
width: 225px;
height: 34px;
line-height: 40px;
filter:alpha(opacity=50);
-moz-opacity:0.5;
opacity:0.5;
-khtml-opacity:0.5;
background-color: #000;
text-align: left;
display: none;
}
2015-08-20