Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我怎样才能让一个 div 闪烁。我将鼠标悬停在 div 元素上。我怎样才能用 jQuery 制作。div 向上闪烁和向下闪烁。然后在 10 秒。
谢谢
你正在寻找这样的东西吗?此代码将使 div 每 10 秒出现和消失一次:
<script type="text/javascript"> var blink = function(){ $('#blinker').toggle(); }; $(document).ready(function() { setInterval(blink, 10000); }); </script> <div id="blinker">This will blink</div>