色综合图-色综合图片-色综合图片二区150p-色综合图区-玖玖国产精品视频-玖玖香蕉视频

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

JS實(shí)現(xiàn)手風(fēng)琴特效

瀏覽:124日期:2024-04-13 10:57:26

本文實(shí)例為大家分享了JS實(shí)現(xiàn)手風(fēng)琴特效的具體代碼,供大家參考,具體內(nèi)容如下

效果圖

JS實(shí)現(xiàn)手風(fēng)琴特效

<!DOCTYPE html><html lang='en'><head> <meta charset='UTF-8'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta http-equiv='X-UA-Compatible' content='ie=edge'> <title>手風(fēng)琴</title> <link rel='stylesheet' href='http://m.lshqa.cn/bcjs/index.css' rel='external nofollow' ></head><body> <div class='wrapper'> <ul class='wrapUl'> <li><div class='title'> <h1>溫泉酒店</h1></div><div class='picBox picBox1'></div><div class='decration'>有誰(shuí)不愛(ài)泡溫泉?浸入霧氣蒸騰的泉水之中,把身體泡成一片茶葉,舒展輕盈。有比這更美妙的感覺(jué)嗎?</div> </li> <li><div class='title'> <h1>時(shí)尚酒店</h1></div><div class='picBox picBox2'></div><div class='decration'>浪漫,是香閨圍籠,是燈火迷離,淚眼婆裟的唯美,是楊柳岸、曉風(fēng)殘?jiān)轮械臒o(wú)語(yǔ)凝噎……</div> </li> <li><div class='title'> <h1>設(shè)計(jì)師酒店</h1></div><div class='picBox picBox3'></div><div class='decration'>前衛(wèi)的酒店設(shè)計(jì)理念,獨(dú)具魅力的風(fēng)格,優(yōu)美的自然風(fēng)光才能有這樣頂級(jí)的酒店</div> </li> <li><div class='title'> <h1>青年旅店</h1></div><div class='picBox picBox4'></div><div class='decration'>我為你煮一杯溫茶,斟一杯美酒。讓我們席地而坐,聽(tīng)你的夢(mèng)想。用你的只言片語(yǔ)裝點(diǎn)我們的夢(mèng)想博物館</div> </li> <li><div class='title'> <h1>民宿客棧</h1></div><div class='picBox picBox5'></div><div class='decration'>在這里,你可以靜靜發(fā)呆,而不被人打擾;在這里,你能看見(jiàn)最美好的星星,能讓你找到最深的感動(dòng)</div> </li> <li><div class='title'> <h1>海島酒店</h1></div><div class='picBox picBox6'></div><div class='decration'>不想過(guò)冬,厭倦沉重,就飛去熱帶的島嶼游泳,卸下包袱,放下壓力,在這碧海藍(lán)天之中</div> </li> <li><div class='title'> <h1>海外酒店</h1></div><div class='picBox picBox7'></div><div class='decration'>因地形地質(zhì)的區(qū)別,世界各地的溫泉也千差萬(wàn)別,選擇一處適合自己的溫泉,你會(huì)忘記世界</div> </li> </ul> </div> <script src='http://m.lshqa.cn/bcjs/jquery.js'></script> <script src='http://m.lshqa.cn/bcjs/index.js'></script></body></html>

JS代碼

var oUl = $(’ul’), oLi = $(’li’), len = oLi.length, width = parseInt(oUl.css(’width’)), gw = width / len, ot = Math.floor((width - 400) / (len - 1)); flag = true;function init(){ if(flag){ change($(oLi[len-1])); }}function bindEvent(){ oLi.on(’click’,function(){ change($(this)); if(($(this).index() +1) == len){ flag = false; }else{ flag = true; } }); oUl.on(’mouseleave’,function(){ init(); })}function change(event){ event.animate({ ’width’:’400px’ },300,’linear’).siblings().animate({ ’width’:ot + ’px’ },300,’linear’); event.find(’.title’).css({ ’display’:’none’ }) event.siblings().find(’.title’).css({ ’display’:’block’ }) event.find(’.decration’).css({ ’bottom’:’0px’ }) event.siblings().find(’.decration’).css({ ’bottom’:’-50px’ })}init();bindEvent();

CSS代碼

*{ margin:0; padding:0; list-style:none;}body{ background-color:#333;}.wrapper{ width:80%; margin:50px auto; padding:40px;}.wrapper ul{ width:100%; height:300px; overflow: hidden;}.wrapper ul li{ float: left; width:14.2; height:260px; position:relative; overflow:hidden; cursor:pointer; }.picBox{ width:100%; height:100%;}.picBox1{ background:url(images/1.jpg) no-repeat center 0;}.picBox2{ background:url(images/2.jpg) no-repeat center 0;}.picBox3{ background:url(images/3.jpg) no-repeat center 0;}.picBox4{ background:url(images/4.jpg) no-repeat center 0;}.picBox5{ background:url(images/5.jpg) no-repeat center 0;}.picBox6{ background:url(images/6.jpg) no-repeat center 0;}.picBox7{ background:url(images/7.jpg) no-repeat center 0;}.wrapper ul li .title{ position:absolute; overflow:hidden; width:100%; height:100%; left:0; top:0; background:rgba(0,0,0,0.5);}.wrapper ul li .title h1{ color:#fff; width:30px; margin:0 auto; display:block; font:20px; padding-top:30px; opacity:0.8;}.wrapper ul li .decration{ width:400px; height:40px; padding-left:20px; padding-right:30px; position:absolute; left:0; bottom:-50px; background:rgba(0,0,0,0.3); color:#FFF; }

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持好吧啦網(wǎng)。

標(biāo)簽: JavaScript
相關(guān)文章:
主站蜘蛛池模板: 91精品一区二区三区在线播放 | 国产原创系列在线 | 日韩高清免费观看 | 国产大臿蕉香蕉大视频 | 萌白酱香蕉白丝护士服喷浆 | 久久久久依人综合影院 | 国产成人性色视频 | 午夜91理论片 | 精品视频一区二区三三区四区 | 久久a热6| 最近免费手机中文字幕3 | 日韩精品视频美在线精品视频 | 国产成人亚洲精品一区二区在线看 | 国产v片成人影院在线观看 国产v片在线播放免费观 | 国产精品亚洲精品 | 女人毛片a毛片久久人人 | 日韩国产成人精品视频人 | 国产人成亚洲第一网站在线播放 | 99热久久精品免费精品 | 亚洲男人的天堂久久香蕉 | 欧美成人高清免费大片观看 | 久热中文字幕在线精品免费 | 在线综合视频 | 国产99视频精品免费视频免里 | 成人性色生活片全黄 | a级片在线免费观看 | 成人国产精品免费视频 | 在线观看的黄网 | 日韩欧美精品在线视频 | 在线观看视频99 | 成人精品亚洲人成在线 | 国产三片高清在线观看 | 女同日韩互慰互摸在线观看 | 一级做a毛片免费视频 | 老妇激情毛片 | 国产三级在线观看视频 | 亚洲精品自拍 | 男女视频免费看 | 欧洲性大片xxxxx久久久 | 欧美性色黄大片在线观看 | 久久99亚洲精品久久久久99 |