摘要:
方法一:元素:not(:first-child){} 实例: li:not(:first-child){} 方法二:元素:nth-child 或者 元素:notnth-of-type 实例: li:nth-child(n+2){} li:nth-of-type(n+2){} 说明: n是从0开始的, 阅读全文
摘要:
鼠标事件 click 当用户点击某个对象时调用的事件句柄。 contextmenu 在用户点击鼠标右键打开上下文菜单时触发 dblclick 当用户双击某个对象时调用的事件句柄。 mousedown 鼠标按钮被按下。 mouseenter 当鼠标指针移动到元素上时触发。 mouseleave 当鼠标 阅读全文
摘要:
HTML代码: <div class="rotationXZ bc"></div> CSS代码 @-webkit-keyframes rotation { from { -webkit-transform: rotate(0deg); } to { -webkit-transform: rotate 阅读全文
摘要:
addEventListener() 方法用于向指定元素添加监听事件。且同一元素目标可重复添加,不会覆盖之前相同事件,配合 removeEventListener() 方法来移除事件。 使用方法: document.getElementById(元素id).addEventListener("cli 阅读全文