jQuery+CSS3文字跑馬燈特效的簡(jiǎn)單實(shí)現(xiàn)
jQuery+CSS3文字跑馬燈特效是一款將跑馬燈背景制作為3D立方體效果,文字在上面移動(dòng)時(shí),就像是文字投影到墻壁上,在轉(zhuǎn)角出會(huì)改變運(yùn)動(dòng)方向。
效果圖如下:
完整HTML代碼如下:
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>jQuery+CSS3文字跑馬燈特效 - 何問起</title><base target="_blank" /> <link rel="stylesheet" > </head> <body> <div id="hovertreemarquee"> <div><span>I ❤ HoverTree 我❤何問起 </span></div> <div aria-hidden="true"><span>I ❤ HoverTree 我❤何問起 </span></div> </div> <form onsubmit="setText(event)"> <label for="textsource">使用你自己的文本</label> <input type="text" id="textsource" value="hwq2.com Is A Good Site!" autocapitalize="characters" pattern=".{5,60}" title="5-30個(gè)字符長(zhǎng)度" placeholder="請(qǐng)輸入文本:hovertree.com"> <input type="submit" class="btn" value="使用"> </form> <div class="hovertreeinfo"><p>可以輸入其他文本,然后點(diǎn)擊“使用”按鈕。<br /> 例如:1314520 hovertree.com <br />或者: 歡迎訪問何問起 <br /> <a >特殊愛心符號(hào)點(diǎn)這里</a> <br />何問起提示:可以放大或者縮小瀏覽器寬度查看效果。 </p></div> <script src="http://down.hovertree.com/jquery/jquery-2.2.4.min.js" type="text/javascript"></script> <script type="text/javascript"> function setText(event){ event.preventDefault(); leftText.innerText = textsource.value.toUpperCase(); rightText.innerText = textsource.value.toUpperCase(); } var leftText = document.querySelector("#hovertreemarquee div:first-of-type span"); var rightText = document.querySelector("#hov"+"ertreemarquee div:last-of-type span"); var textsource = document.getElementById("textsource"); setText(); </script> <div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"> <p>適用瀏覽器:FireFox、Chrome、Edge、Safari、Opera、傲游、搜狗、世界之窗、IE11. 不支持IE8及以下瀏覽器。</p> <p>來源:<a target="_blank">何問起</a> <a >網(wǎng)頁(yè)特效</a> <a >代碼說明</a></p> </div> </body> </html>
以上就是小編為大家?guī)淼膉Query+CSS3文字跑馬燈特效的簡(jiǎn)單實(shí)現(xiàn)全部?jī)?nèi)容了,希望大家多多支持腳本之家~
- jQuery實(shí)現(xiàn)適用于移動(dòng)端的跑馬燈抽獎(jiǎng)特效示例
- 基于Jquery的文字滾動(dòng)跑馬燈插件(一個(gè)頁(yè)面多個(gè)滾動(dòng)區(qū))
- 基于jquery的文字向上跑動(dòng)類似跑馬燈的效果
- jquery.rotate.js實(shí)現(xiàn)可選抽獎(jiǎng)次數(shù)和中獎(jiǎng)內(nèi)容的轉(zhuǎn)盤抽獎(jiǎng)代碼
- jQuery實(shí)現(xiàn)轉(zhuǎn)動(dòng)隨機(jī)數(shù)抽獎(jiǎng)效果的方法
- jquery實(shí)現(xiàn)九宮格大轉(zhuǎn)盤抽獎(jiǎng)
- jquery——九宮格大轉(zhuǎn)盤抽獎(jiǎng)實(shí)例
- jQuery實(shí)現(xiàn)類似老虎機(jī)滾動(dòng)抽獎(jiǎng)效果
- 基于jQuery實(shí)現(xiàn)的雙11天貓拆紅包抽獎(jiǎng)效果
- jquery轉(zhuǎn)盤抽獎(jiǎng)功能實(shí)現(xiàn)
- jQuery移動(dòng)端跑馬燈抽獎(jiǎng)特效升級(jí)版(抽獎(jiǎng)概率固定)實(shí)現(xiàn)方法
相關(guān)文章
jQuery實(shí)現(xiàn)DIV層收縮展開的方法
這篇文章主要介紹了jQuery實(shí)現(xiàn)DIV層收縮展開的方法,實(shí)例分析了jQuery中toggle與animate等方法的使用技巧,需要的朋友可以參考下2015-02-02jQuery+slidereveal實(shí)現(xiàn)的面板滑動(dòng)側(cè)邊展出效果
WEB開發(fā)中有時(shí)需要在頁(yè)面上設(shè)置一個(gè)控制面板,默認(rèn)是不顯示的,當(dāng)用戶有需要時(shí)可以通過按鈕觸發(fā)調(diào)用面板展示。常見的有頁(yè)面?zhèn)冗吇雒姘逍Ч?。本文將使用jQuery插件并結(jié)合實(shí)例給大家介紹一下面板滑動(dòng)展示效果。2015-03-03用jQuery實(shí)現(xiàn)的智能隱藏、滑動(dòng)效果的返回頂部代碼
這篇文章主要介紹了用jQuery實(shí)現(xiàn)的智能隱藏、帶滑動(dòng)效果的返回頂部代碼,非常實(shí)用,需要的朋友可以參考下2014-03-03基于jQuery實(shí)現(xiàn)的查看全文功能【實(shí)用】
本文分享了利用jQuery實(shí)現(xiàn)的查看全文功能:文本內(nèi)容少于四行,不顯示查看全文;超過五行時(shí)才顯示出來并有此功能;很實(shí)用,下面就跟小編一起來看看吧2016-12-12