当我为我的面包店建立一个网站时,我想制作一个花哨的标题来触发每个字母的颜色.所以我可以利用跨度,但这是令人筋疲力尽的.我想使用:第一个字母或分别:first-char但没有任何作用.你们中有谁知道怎么做吗?
谢谢和Saludos!
h4{
font-size:100px;
margin-bottom:20px;
margin-top:0;
padding:0px;
font-family: 'Tangerine', cursive;
font-weight:normal;
}
h4:nth-letter(2) {
color:#06C !important;
}
h4:nth-letter(3) {
color:#C9C !important;
}
Run Code Online (Sandbox Code Playgroud) 亲爱的专家,
我有个问题.我是Jquery的新手,我正在尝试根据下面给出的示例代码使用div动画.会发生的事情是,当鼠标在div上以不同的速度徘徊不同时间时,动作会自我复制并导致我想以某种方式避免的可用性行为.有没有办法让函数检查鼠标行为,例如div在给定的时间内悬停,以避免不必要的多次激活?我希望我解释得很好.
感谢您的输入.
$(document).ready(function() {
$("#expand_smoke").hover(
//on mouseover
function() {
$(this).animate({
height: '+=125' //adds 125px
}, 'slow' //sets animation speed to slow
);
},
//on mouseout
function() {
$(this).stop()
$(this).animate({
height: '60' //changes back to 60px
}, 'slow'
);
}
);
});
Run Code Online (Sandbox Code Playgroud)