久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      使用css過渡有哪些觸發(fā)方式

      觸發(fā)方式有:1、通過偽類元素“:hover”觸發(fā),語法“元素{transition:屬性 過渡時間}元素:hover{屬性:屬性值}”;2、通過“element.classList.add("元素名稱")”語句觸發(fā)css過渡效果。

      使用css過渡有哪些觸發(fā)方式

      本教程操作環(huán)境:windows7系統(tǒng)、CSS3&&HTML5版、Dell G3電腦。

      第一種: 通過偽類元素觸發(fā)

      	<style> 		.box{       		width: 100px;       		height: 100px;       		background-color: blueviolet;       		transition: width 1s linear .5s;     	}     	.box:hover{       		width: 400px;     	} 	</style> 	<p class="box">     </p>

      第二種: 通過JS觸發(fā)

      通過js添加必須有一定的延遲(延遲去掉無效果)來改變元素的樣式

      <style> 	.box{       width: 100px;       height: 100px;       background-color: blueviolet;       transition: width 1s linear .5s;     }     .box1{       width: 400px;     }</style> <p class="box">     </p>  <scrpit> 	setTimeout(() => {       let element = document.getElementsByClassName('box')[0];       element.classList.add('box1')     }, 1) </scrpit>

      推薦學習:css視頻教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號