렌더링은 다음과 같습니다. 페이지 코드: 코드 복사 코드는 다음과 같습니다. <머리> <제목>百島有啊万栏展示效果 <br>body,div,dl,dt,dd,ul,li,h3{margin:0;padding:0;} <br>body{color:#333;font:12px/1.5 arial;} <br>li {list-style:none;} <br>a:link,a:visited,a:active{color:#333;text-꾸밈:none;} <br>a:hover{color:#F30;} <br>img{border:none;} <br>#box{width:740px;margin:10px auto;} <br>#container{position:relative;height:232px; background:#FCFCFC;} <br>#container . 항목{위치:절대;상단:0;왼쪽:0;너비:492px;높이:230px;오버플로우:숨겨짐;배경:#FAFAFA;테두리:1px 솔리드 #ddd;z-index:1;불투명도:1;} <br>#container .item .pic{float:left;width:210px;height:200px;display:inline;margin:15px;} <br>#container .item .pic img{width:210px;height:200px;vertical -align:top;} <br>#container .item .txt{float:left;width:250px;margin-top:12px;} <br>#container .item .txt dt{font-size:14px;font- 무게:700;} <br>#container .item .txt .info{color:#999;} <br>#container .item .txt dd{height:24px;line-height:24px;} <br>#container .item .txt dd 스팬{float:left;} <br>#container .item .txt .star{position:relative;float:left;height:12px;width:69px;margin:6px 0 0 5px;} <br>#container .item .txt .star .star_red{위치:절대;상단:0;왼쪽:0;높이:12px;너비:69px;z-index:2;배경:url(http://js.fgm. cc/learn/lesson10/img/youa/star.png) 반복-x 왼쪽 상단 투명하게 스크롤;} <br>#container .item .txt .star .star_grey{배경:url(http://js.fgm.cc /learn/lesson10/img/youa/star.png) 반복-x 왼쪽으로 스크롤 -15px transparent;height:12px;width:69px;} <br>#container .item .txt .pink,#container .item .txt . 파란색,#container .item .txt .green{color:#FFF;font-weight:700;margin-right:2px;Background:#F66B5B;padding:0 5px;} <br>#container .item .txt .blue {배경:#96BAE7;} <br>#container .item .txt .green{배경:#9CDBC3;} <br>#container .item .txt .comment{width:232px;height:99px;margin-top:10px ;배경:#FFF;테두리:1px 단색 #EAEAEA;} <br>#container .item .txt .comment h3{font-size:12px;font-weight:400;height:24px;line-height:24px;border -하단:1px 솔리드 #E9E9E9;패딩:0 10px;} <br>#container .item .txt .comment .comment_list{width:220px;height:60px;overflow:hidden;margin:8px 0 0 10px;} <br>#container .item .txt .comment .comment_list ul{width:220px;} <br>#container .item .txt .comment .comment_list ul li{height:20px;line-height:20px;white-space:nowrap; } <br>#container .item .txt .comment .comment_list ul li b{color:#999;font-weight:400;} <br>#control{height:37px;text-align:center;배경:url( http://js.fgm.cc/learn/lesson10/img/youa/bg.png) no-repeat;} <br>#controlspan{width:8px;height:8px;font-size:0;line- 높이:0;커서:포인터;디스플레이:inline-block;배경색:#FEFEFE;테두리:1px 단색 #BCC1C5;여백:13px 2px 2px;} <br>#controlspan.active{배경색상:#848484 ;border:1px solid #6E6E6E;} <br> <br>함수 요아(obj) <br>{ <br>this.obj = $(obj); <br>this.container = $("컨테이너"); <br>this.control = $("제어"); <br>this.items = $$$("item", this.container); <br>this.iCenter = 2; <br>this.aSort = []; <br>this.timer = null; <br>this.oData = [ <br>{왼쪽:0, zIndex:2, 불투명도:30}, <br>{왼쪽:40, zIndex:3, 불투명도:60}, <br>{왼쪽:124, zIndex:4, opacity:100}, <br>{left:208, zIndex:3, opacity:60}, <br>{left:246, zIndex:2, opacity:30}, <br>{left:40 , zIndex:0, 불투명도:0} <br>]; <br>this.__create__() <br>}; <br>Youa.prototype.__create__ = function () <br>{ <br>var that = this; <br>var oSpan = null; <br>var i = 0; <br>for (i = 0; i { <br>that.items[i].number = i; <br>that.aSort[i] = that.items[i]; <br>oSpan = document.createElement("span"); <br>oSpan.번호 = i; <br>that.control.appendChild(oSpan) <br>} <br>for (i = 0; i that.aSpan = $$("span", that.control); <br>that.control.onmouseover = 함수(ev) <br>{ <br>var oEv = ev || 이벤트; <br>var oTarget = oEv.target || oEv.srcElement; <br>if (oTarget.tagName.toUpperCase() == "SPAN") <br>{ <br>that.aSort.sort(function (a, b) {return a.number - b.number}); <br>if (oTarget.number < that.iCenter) <BR>{ <BR>for (i = 0; i < that.iCenter - oTarget.number; i ) that.aSort.unshift(that.aSort. 팝()); <BR>that.__set__(); <BR> false 반환 <BR>} <BR>else if (oTarget.number > that.iCenter) <br>{ <br>for (i = 0; i < oTarget.number - that.iCenter; i ) that.aSort.push(that.aSort.shift()); <BR>that.__set__(); <BR>false 반환 <BR>} <BR>else <BR>{ <BR>that.__set__() <BR>} <BR>} <BR>} <BR>this.__set__(); <BR>this.__switch__(); <BR>this.__autoPlay__() <BR>}; <BR>Youa.prototype.__set__ = function () <BR>{ <BR>var i = 0; <BR>for (i = 0; i < this.aSort.length; i++) this.container.appendChild(this.aSort[i]); <BR>for (i = 0; i < this.aSpan.length; i++) this.aSpan[i].className = ""; <BR>this.aSpan[this.aSort[this.iCenter].number].className = "active"; <BR>for (i = 0; i < this.aSort.length; i++) <BR>{ <BR>this.aSort[i].index = i; <BR>if (i < 5) <BR>{ <BR>new Animate(this.aSort[i], this.oData[i]); <BR>} <BR>else <BR>{ <BR>new Animate(this.aSort[i], this.oData[this.oData.length - 1]) <BR>} <BR>} <BR>}; <BR>Youa.prototype.__switch__ = function () <BR>{ <BR>var i = 0; <BR>var that = this; <BR>this.container.onclick = function (ev) <BR>{ <BR>var oEv = ev || event; <BR>var oTarget = oEv.target || oEv.srcElement; <BR>var index = findItem(oTarget); <br><br>if (index < that.iCenter) <BR>{ <BR>for (i = 0; i < that.iCenter - index; i++) that.aSort.unshift(that.aSort.pop()); <BR>that.__set__(); <BR>return false <BR>} <BR>else if (index > that.iCenter) <br>{ <br>for (i = 0; i < index - that.iCenter; i++) that.aSort.push(that.aSort.shift()); <BR>that.__set__(); <BR>return false <BR>} <BR>function findItem (element) <BR>{ <BR>return element.className == "item" ? element.index : arguments.callee(element.parentNode) <BR>} <BR>}; <BR>}; <BR>Youa.prototype.__autoPlay__ = function () <BR>{ <BR>var that = this; <BR>that.timer = setInterval(function () <BR>{ <BR>that.aSort[3].click() <BR>}, 3000); <BR>that.obj.onmouseover = function () <BR>{ <BR>clearInterval(that.timer) <BR>}; <BR>that.obj.onmouseout = function () <BR>{ <BR>that.timer = setInterval(function () <BR>{ <BR>that.aSort[3].click() <BR>}, 3000) <BR>} <BR>}; <BR>function $ (id) <BR>{ <BR>return typeof id === "string" ? document.getElementById(id) : id <BR>}; <BR>function $$ (tagName, oParent) <BR>{ <BR>return (oParent || document).getElementsByTagName(tagName) <BR>}; <BR>function $$$ (className, element, tagName) <BR>{ <BR>var i = 0; <BR>var aClass = []; <BR>var reClass = new RegExp("(^|//s)" + className + "(//s|$)"); <BR>var aElement = $$(tagName || "*", element || document); <BR>for (i = 0; i < aElement.length; i++) reClass.test(aElement[i].className) && aClass.push(aElement[i]); <BR>return aClass <BR>}; <BR>function css (element, attr, value) <BR>{ <BR>if (arguments.length == 2) <BR>{ <BR>if (typeof arguments[1] === "string") <BR>{ <BR>return element.currentStyle ? element.currentStyle[attr] : getComputedStyle(element, null)[attr] <BR>} <BR>else <BR>{ <BR>for (var property in attr) <BR>{ <BR>property == "opacity" ? <BR>(element.style.filter = "alpha(opacity=" + attr[property] + ")", element.style.opacity = attr[property] / 100) : <BR>element.style[property] = attr[property] <BR>} <BR>} <BR>} <BR>else if (arguments.length == 3) <BR>{ <BR>switch (attr) <BR>{ <BR>case "width": <BR>case "height": <BR>case "top": <BR>case "left": <BR>case "right": <BR>case "bottom": <BR>element.style[attr] = value + "px"; <BR>break; <BR>case "opacity" : <BR>element.style.filter = "alpha(opacity=" + value + ")"; <BR>element.style.opacity = value / 100; <BR>break; <BR>default : <BR>element.style[attr] = value; <BR>break <BR>} <BR>} <BR>return element <BR>}; <BR>function Animate (element, options, fnCallBack) <BR>{ <BR>this.obj = $(element); <BR>this.options = options; <BR>this.__onEnd__ = fnCallBack; <BR>this.__startMove__() <BR>}; <BR>Animate.prototype.__startMove__ = function () <BR>{ <BR>var that = this; <BR>clearInterval(that.obj.timer); <BR>that.obj.timer = setInterval(function () <BR>{ <BR>that.__doMove__() <BR>}, 30); <BR>}; <BR>Animate.prototype.__doMove__ = function () <BR>{ <BR>var complete = true; <BR>var property = null; <BR>for (property in this.options) <BR>{ <BR>var iCur = parseFloat(css(this.obj, property)); <BR>property == "opacity" && (iCur = parseInt(iCur.toFixed(2) * 100)); <BR>var iSpeed = (this.options[property] - iCur) / 5; <BR>iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed); <br>this.options[property] == iCur || (complete = false, css(this.obj, property, iSpeed + iCur)) <br>} <br>complete && (clearInterval(this.obj.timer), this.__onEnd__ && this.__onEnd__.apply(this.obj)) <br>}; <br>window.onload = function () <br>{ <br>new Youa("box") <br>}; <br> 必图拳馆 不要把自己困住 你需要释放! 总体评价: 用户印象:过瘾带劲有活力 用户评价 thaifight:是一个非常好的一个拳... 快乐小友:散打课的实战机会挺多... 爱情赛车:白天人很少,喜欢安静... 北京「七田阳光」全脑教育培训中心 点亮孩子智慧人生 总体评价: 用户印象:亲切耐心干净 用户评价 Jcenter:如此诚恳的教育机构 ... citaslin:孩子的进步很大 甲鱼爱媛媛:七田阳光很注重品质,... 慕纱莹雪婚纱礼服馆 物超所值的性价比,尽在慕纱莹雪! 总体评价: 用户印象:精致做工好专业 用户评价 小企鹅快跑:这个周末去取了我定的... 月逢明时:这家婚纱店的婚纱做工... 日历本丢了:上周末去取了婚纱,婚... 北京金三优装饰有限责任公司 一站式服务让你省时、省力、省钱、省心 总体评价: 用户印象:口碑好规模很大讲信誉 用户评价 紫婧之梦:这家店不错哦! gotometop:装修工都还挺朴实的,... libangcheng1:这家公司还可以,去年... 鸿喜族休闲俱乐部—潘家园店 专注人类健康,打造财富传奇! 总体评价: 用户印象:真好专业手法好 用户评价 永封de铁盒:环境挺不错,灯光控制... 老冯爱国:不错的地方,是个很有... 白云寺方丈:我不会打台球,但朋友... 北京心拓城拓展培训 客户第一 执行有力 激情勤奋 简单团结 总体评价: 사용자 노출: 전문가긍정적 ;h3>사용자 리뷰 /b>책임감이 대단해요~ 완다는 물고기입니다. 친구들이 개발에 참여했습니다... li> ;li>bjftxiaoniu: 호호, 여기서 보세요... ; a> ; 한의사 전문 여드름 치료 체인 베이징 직영점< /a> 여드름만을 제거하므로 더욱 전문적입니다전체 평가:< ;/span> div> 사용자 노출: 조심하세요Professional < /dl> 사용자 리뷰 < ;b>Tianya hehaijiao: 이 가게는 손님이 많아서 아주 좋습니다... < b>신을 사랑합니다 Ma Geili: 이틀간의 치료 후 기분이 좋아졌습니다... 천국의 언어:요즘 우리는 며칠 동안 확실한 효과를 보았습니다...< /li> 🎜> 🎜> Romanka 웨딩 사진< /a> 좋은 평판, 가격 대비 좋은 가치, 추가 소비 없음전체 평가: < /div> 사용자 노출:좋은 평판 spa class="blue">매우 좋아요완벽해요 사용자 리뷰 h3> ;li>분명히 표시하세요: 아주 맛있어요. 어머니께서 칭찬해 주셨어요...좋아하신다면 그냥 계속하세요: 서비스 태도도 좋고 옷도... li> 사랑합니다: 마지막 사진 이후 친구여... div> HTML>
用户评价