日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

图片轮换-jQuery

發(fā)布時(shí)間:2023/12/18 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 图片轮换-jQuery 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

7個(gè)展示位,每次向左移動(dòng)1位

<div class="user-box"><div id="user1" class="user-item"></div><div id="user2" class="user-item"></div><div id="user3" class="user-item"></div><div class="right-box"><div id="user4"></div><div id="user5"></div><div id="user6"></div><div id="user7"></div><div class="shadow"></div></div> </div> var speed = 5000; var playTimer = setInterval(runPlay, speed); var a = 0, b = 1, c = 2, d = 3, e = 4, f = 5, g = 6; var user_url = '/api/comment/getCommentList'; var userDataLeft = []; var userDataRight = []; var userLastIndex = 0; $.ajax({type : "get",url : user_url,success : function(data){if (data.data.length > 0) {userLastIndex = data.data.length - 1;$.each(data.data,function(i,item){var _html = '<a href="'+item.url+'">' +'<div class="head"><img src="'+item.user.avatar+'" />' +'<h5>'+item.user.name+'</h5></div>' +'<div class="intro">'+item.content+'</div>' +'<div class="purchasedAt">Purchased At: '+item.ll_time+'</div></a>';var _avatar = '<img src="'+item.user.avatar+'"/>';userDataLeft.push(_html);userDataRight.push(_avatar);})showUsers();}} }); function runPlay() {if (a > userLastIndex) a = 0;if (b > userLastIndex) b = 0;if (c > userLastIndex) c = 0;if (d > userLastIndex) d = 0;if (e > userLastIndex) e = 0;if (f > userLastIndex) f = 0;if (g > userLastIndex) g = 0;showUsers();a++;b++;c++;d++;e++;f++;g++; } function showUsers() {$("#user1").html(userDataLeft[a]);$("#user2").html(userDataLeft[b]);$("#user3").html(userDataLeft[c]);$("#user4").html(userDataRight[d]);$("#user5").html(userDataRight[e]);$("#user6").html(userDataRight[f]);$("#user7").html(userDataRight[g]); }$(".user-box").mouseenter(function() {clearInterval(playTimer); }).mouseleave(function() {playTimer = setInterval(runPlay, speed); }); .user-box {position: relative;margin-top: 100px; } .user-box .user-item {width: 27.5%;display: inline-block;padding: 24px;box-sizing: border-box;border-radius: 10px;margin-right: 3%;background: #FAFAFA;color: #333;text-align: center; } .user-box .user-item:hover {box-shadow: 0px 3px 12px 0px rgba(153, 153, 153, 0.2); } .user-box .user-item a {text-decoration: none; } .user-box .user-item .head {margin-top: -60px;color: #333; } .user-box img {width: 68px;height: 68px;border-radius: 68px; } .user-box .user-item h5 {font-size: 20px;margin: 20px; } .user-box .user-item .intro {font-size: 16px;height: 118px;overflow: hidden;line-height: 24px; } .user-box .user-item .purchasedAt {margin: 32px auto 26px;font-size: 14px;color: #666; } .user-box .right-box {position: absolute;top: -38px;right: 0;text-align: right; } .user-box .right-box div {margin-bottom: 26px; } .user-box .right-box div:last-child {margin-bottom: 0; } .user-box .right-box .shadow {width: 100%;height: 70px;position: absolute;bottom: 30px;background-image: linear-gradient(180deg, transparent, #FFF); }

3個(gè)展示位,每次更換3張

<div class="editor-Box"></div> var speed = 5000; var playTimer = setInterval(runPlay, speed); var x = 0; var editor_url = '/api/author/getAuthorList'; var resData = [{"id":1,"name":"Veronica Hope","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/08\/da54735bbe4651db8ae66df0a8ffc1059971.png","user_id":70,"instagram":"","twitter":"","lives_in":"Ohio, USA","education":"University of Alabama","intro":"Veronica Hope is our contracted writer. She always points out the pros and cons of products sharply, so as to help everyone quickly find the most suitable one. Veronica specializes in personal care products, and also has an understanding of various fields such as fashion and beauty. She always starts from the most essential features of the product and puts forward truly meaningful recommendations.","experience":"Veronica began to research beauty & care products during university, and read many fashion magazines. She has three years of guides writing experience and has always valued readers' feedback.","expertise":"[\"Beauty\"]","education_intro":"Veronica graduated from the University of Alabama with a Bachelor of Advertising. She is knowledgeable in advertising and marketing and is keen to share her life experience.","deleted_at":null,"created_at":"2021-08-03T07:24:49.000000Z","updated_at":"2021-08-03T07:31:06.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/veronica-hope-1"},{"id":4,"name":"Grace Hannigan","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/e5f56356591c7de73ea22c1167a23dd46544.png","user_id":67,"instagram":"","twitter":"","lives_in":"San Diego, California","education":"Santa Clara University","intro":"Grace Hannigan is a freelance writer. Before that, she used her love for writing about fashion, and beauty that shared her expertise. As a beauty and fashion enthusiast, Grace also enjoys trying new products and catching up to fashion shows.","experience":"Previously Grace Hannigan was the fashion assistant. \nShe has been freelance journalist who writes about skincare, makeup and fashion since 2018.","expertise":"[\"Beauty\",\"Skincare\",\"Fashion\"]","education_intro":"Grace graduated from the Santa Clara University with a sociology degree.","deleted_at":null,"created_at":"2021-08-13T09:01:22.000000Z","updated_at":"2021-09-03T03:48:58.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/grace-hannigan-4"},{"id":5,"name":"Laurel Hanson","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/21847f60571e42e54cecdcaddcf5b1695097.png","user_id":72,"instagram":"","twitter":"","lives_in":"Wellington, New Zealand","education":"University of Otago","intro":"Lucia graduated from the University of Otago, majoring in Tourism, Languages and Culture. \nWriter with over three years of experience in traveling, fashion, and beauty.","experience":"Lucia has been working in a small-sized tourism-related company for several years and then she became a freelance writer and content producer. She writes articles about all things traveling, fashion, and beauty.","expertise":"[\"Beauty\",\"Fashion\",\"Traveling\"]","education_intro":"Lucia received a Bachelor of Arts in Tourism, Languages and Cultures from the University of Otago. She knows well of the language and culture of other countries and always learns new things as well as travels to other countries to broaden her horizon.","deleted_at":null,"created_at":"2021-08-13T09:36:50.000000Z","updated_at":"2021-09-03T11:58:31.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/laurel-hanson-5"},{"id":8,"name":"Evelyn Davis","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/c64823ca955a11519bebb9c7b720636e4132.png","user_id":73,"instagram":"","twitter":"","lives_in":"Chicago, USA","education":"Pennsylvania State University","intro":"Evelyn is a fashion and beauty editor in Chicago. She is avid for clothing designing and sharing some versatile outfits. In her spare time, she always looks through magazines and videos about fashion and makeup to capture the latest fashion trends.","experience":"During her high school, she began to be interested in fashion and participate in some contests with many awards. And she has been an editor on fashion and beauty for three years.","expertise":"[\"clothing designing\",\"fashion\"]","education_intro":"Evelyn graduated from Pennsylvania State University with a Bachelor of Art Designing.","deleted_at":null,"created_at":"2021-08-13T12:11:20.000000Z","updated_at":"2021-12-22T11:52:38.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/evelyn-davis-8"},{"id":9,"name":"Lucia Hansley","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/b119af6fbe7728a0f464f4f7cb3849233751.png","user_id":62,"instagram":"","twitter":"","lives_in":"City of New Haven","education":"The University of New Haven","intro":"Professional product reviewer, loving to share good stuff with people. She’s doing funny and useful articles for readers and recommend them after her own test.","experience":"She has been a copy writer for 12 years. She has completed articles for a variety of site pages ranging from products to travel.","expertise":"[\"Fashion\",\"beauty and travel\"]","education_intro":"Master of The University of New Haven. Good knowledge of English writing","deleted_at":null,"created_at":"2021-08-19T09:32:44.000000Z","updated_at":"2021-09-03T09:41:21.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/lucia-hansley-9"},{"id":13,"name":"Lecea Hudson","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/4ec4bc7615ace0f4912c1b4ce059085d1727.png","user_id":75,"instagram":"","twitter":"","lives_in":"Chicago","education":"Boston College","intro":"Lecea Hudson is our contracted writer. She is willing to share her life, her loving stuff and help everyone find the most suitable things quickly.","experience":"Lecea Hudson has been a freelance writer since she was in college. Her understanding of beauty and fashion has earned a lot of praise and fans.","expertise":"[\"Beauty\",\"Fashion\"]","education_intro":"BA in English and Advertising","deleted_at":null,"created_at":"2021-08-20T02:01:26.000000Z","updated_at":"2021-12-22T10:19:54.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/lecea-hudson-13"},{"id":14,"name":"Mandy Franklin","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/bdcfd48925866ebe1088c04373fa0a022026.png","user_id":63,"instagram":"mandyfranklin777","twitter":"","lives_in":"New York","education":"Cornell University","intro":"Mandy Franklin is a freelance fashion, health, beauty writer and blogger based in New York. Mandy, an avid internet shopper, is the first to share money-saving and time-saving tips with the rest of the crew. She enjoys attending live music, keeping firness, catching up on Netflix shows in holiday. \nShe also has a penchant for athleisure and makeup.","experience":"Her love of fashion began in middle school, and she was captivated from the moment she received her first bag (a Coach bag, of course). During her undergraduate career, she researched how clothing fits to maximize athletic performance. She also evaluates bags, shoes, liquid foundations and other personal care products. She is a member of some industry committees, has served as an expert judge for a number of award programs, and is frequently the first to learn about new product launches.","expertise":"[\"Fashion\",\"Beauty\"]","education_intro":"BA in Journalism and English","deleted_at":null,"created_at":"2021-08-20T02:01:32.000000Z","updated_at":"2021-11-24T03:59:59.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/mandy-franklin-14"},{"id":15,"name":"Maia Carter","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/496a3a4e04edf2b7fca802309b04caa38275.png","user_id":66,"instagram":"","twitter":"","lives_in":"New York City","education":"The University of Chicago","intro":"Passionate copy writer, dedicating to producing eye-catching contents. She is good at product reviews in the fields of fashion, beauty and travel. Her writing works are so professional and logical.","experience":"Content writing expert, 11 years of copy writing","expertise":"[\"Fashion\"]","education_intro":"Master of English Literature in The University of Chicago. Good knowledge of English writing skills and focusing on reader friendly content.","deleted_at":null,"created_at":"2021-08-20T02:03:02.000000Z","updated_at":"2021-11-10T08:47:27.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/maia-carter-15"},{"id":16,"name":"Carrie Kathleen","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/c3694f7fe9929676b62e4ca1a643fe714691.png","user_id":68,"instagram":"","twitter":"","lives_in":"Atlanta, Georgia","education":"Emory University","intro":"Carrie Kathleen is a professional content writer. She is good at analyzing fashion products, cosmetics, and travel gadgets for specific use and targeted people. For each item, she has her own ideas and is very fast to catch product highlights. Her works are really brilliant. Our page viewers really like reading her collections.","experience":"As a copywriter with over 10 years of experience, Carrie Kathleen creates high-quality content for us at the very beginning. With her cooperation, we can easily go up with the trend. She's really fast and productive.","expertise":"[\"Fashion Column Writer\",\"Beauty Product Blogger\",\"Travel Gadget Expert\"]","education_intro":"Emory University","deleted_at":null,"created_at":"2021-08-20T02:21:12.000000Z","updated_at":"2021-11-17T10:18:09.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/carrie-kathleen-16"},{"id":17,"name":"Sophie Willis","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/09\/e293ec07d5e44025c9af1b2625d866239933.png","user_id":64,"instagram":"","twitter":"","lives_in":"Brooklyn, NY","education":"Emerson College","intro":"Sophie Willis is a freelance editor with us, who splits time between NYC and LA, covering skincare, makeup, and fashion products and trends.","experience":"Prior to working with us, Sophie has been creating editorial content in fashion, beauty, lifestyle, and related consumer topics for five years, and has gained an extensive understanding of shopping and engaging customers in a digital space.","expertise":"[\"Fashion\",\"Beauty\",\"Pop culture\"]","education_intro":"Graduated from Emerson College with a Bachelor's Degree in Journalism, Sophie is a creative content writer with passion for life and culture.","deleted_at":null,"created_at":"2021-08-20T02:32:46.000000Z","updated_at":"2021-09-04T07:13:25.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/sophie-willis-17"},{"id":18,"name":"Daisy Walker","avatar":"https:\/\/d2nofxwfjyc39o.cloudfront.net\/goods\/2021\/12\/c1145340121b3131d629efa7a3e34968422.jpg","user_id":81,"instagram":"","twitter":"","lives_in":"Phoenix, Arizona","education":"University of Iowa","intro":"Daisy Walker loves to share reviews of fantastic product. She specializes in fashion, jewelry and home decoration, and offers lots of useful suggestions about how to choose the right product.","experience":"As an experienced copywriter, Daisy Walker has been committed to writing for over 5 years, and her articles are favored by many customers.","expertise":"[\"Fashion\",\"Jewelry\",\"Home Decoration\"]","education_intro":"University of Iowa","deleted_at":null,"created_at":"2021-12-17T06:11:29.000000Z","updated_at":"2021-12-22T10:38:24.000000Z","url":"https:\/\/www.guidemaster.org\/editor\/daisy-walker-18"} ]; var editorData = []; var editorLastIndex = resData.length - 1 $.each(resData, function (v, val) {var _avatar = val.avatar != undefined ? val.avatar : '/images/home/nav_avatar.jpg';var _editor = '<div class="editor-item"><a href="' + val.url + '"><img src="' + _avatar + '" οnerrοr="javascript:this.src=\'/images/home/nav_avatar.jpg\';"/><h5>' + val.name + '</h5></a><div class="intro">' + val.intro + '</div></div>';$(".editor-Box").append(_editor); }) $(".editor-Box .editor-item:nth-child(-n+3)").css("display", "inline-block");function runPlay() {x += 3;$(".editor-Box .editor-item").hide();if (x > editorLastIndex) x = 0;$(".editor-Box .editor-item:eq(" + x + ")").css("display", "inline-block");if ((x + 1) <= editorLastIndex) {$(".editor-Box .editor-item:eq(" + (x+1) + ")").css("display", "inline-block");if ((x + 2) <= editorLastIndex) {$(".editor-Box .editor-item:eq(" + (x+2) + ")").css("display", "inline-block");}else {x = -2;$(".editor-Box .editor-item:eq(0)").css("display", "inline-block");}}else {x = -1;$(".editor-Box .editor-item:eq(0)").css("display", "inline-block");if ((x + 2) <= editorLastIndex) {$(".editor-Box .editor-item:eq(" + (x+2) + ")").css("display", "inline-block");}} }$(".editor-Box").mouseenter(function () {clearInterval(playTimer); }).mouseleave(function () {playTimer = setInterval(runPlay, speed); }); .editor-Box {text-align: center; } .editor-Box .editor-item {width: 389px;display: none;padding: 0 50px;box-sizing: border-box;text-align: center; } .editor-Box .editor-item a {text-decoration: none; } .editor-Box .editor-item a:hover {text-decoration: underline; } .editor-Box img {width: 150px;height: 150px;border-radius: 150px; } .editor-Box .editor-item h5 {color: #121212;font-size: 24px;font-weight: 500;margin: 24px 0 16px; } .editor-Box .editor-item .intro {font-size: 16px;height: 72px;overflow: hidden;line-height: 24px; }

總結(jié)

以上是生活随笔為你收集整理的图片轮换-jQuery的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产无遮挡a片又黄又爽 | 古代黄色片 | 三浦惠理子aⅴ一二三区 | 成人欧美一区二区三区黑人 | 色婷婷综合久久久久中文一区二区 | 不卡一区二区在线视频 | 国产精品毛片一区二区在线看 | 三级福利片 | 欧美www.| a级性生活视频 | aa丁香综合激情 | av大全在线观看 | 国产在线激情视频 | 丰满少妇一级片 | 国产精品麻豆一区二区三区 | 7777奇米影视| 久久久久国产视频 | 亚洲福利网址 | 欧美日韩91 | 欧美日韩成人一区 | 摸大乳喷奶水www视频 | 亚洲综合免费视频 | 蜜臀av夜夜澡人人爽人人 | 大屁股白浆一区二区三区 | 91 在线观看| 红色假期黑色婚礼2 | 国产免费叼嘿网站免费 | 91老师国产黑色丝袜在线 | 亚洲激情a | 久久综合伊人 | 日产精品久久久久久久 | jizz成熟丰满老女人 | 温柔女教师在线观看 | 国产精品欧美久久久久天天影视 | 青青草华人在线 | 欧美视频福利 | 美女网站免费黄 | 殴美一区二区 | 国产精品久久不卡 | 国产精品人人 | 天堂8中文在线 | 精品久久久久久无码国产 | 一级黄色视屏 | 亚洲av色香蕉一区二区三区 | 黄色成人免费网站 | www.狠狠操| 麻豆av在线看 | 黄色av网站在线免费观看 | 操操插插| 中文字幕av无码一区二区三区 | 中国女人做爰视频 | a极毛片| 九色porny蝌蚪视频 | 一区二区传媒有限公司 | 刘亦菲一区二区三区免费看 | 成人a√| 成人免费久久 | 日韩精品一二三四 | 香蕉视频18 | 成年人看的羞羞网站 | 久久久久久久毛片 | 最新国产网站 | 久久精品一区二区三区黑人印度 | 福利片在线看 | 国产a免费 | 一级特黄a| 亚洲三区视频 | 国产91一区 | 久久国产精彩视频 | 污污污污污污www网站免费 | 日本福利在线观看 | 亚洲精品无amm毛片 国内一区二区三区 | 国产在线视视频有精品 | 青青草偷拍视频 | 日韩在线免费看 | 久久久久久久人妻无码中文字幕爆 | 性插动态视频 | 国产黄色免费 | 99久久网站 | 色www.| 男女超爽视频免费播放 | 精产国产伦理一二三区 | 亚洲精品第一页 | 国产精品一线天 | 1000部啪啪 | 成年人av在线播放 | 嫩草视频入口 | 亚洲国产剧情 | 日韩性高潮 | 国产一级一片免费播放放a 丁香六月色 | 国产成人精品无码免费看夜聊软件 | 亚洲国产视频在线观看 | 欧美aⅴ在线观看 | 色视频网 | 在线不卡欧美 | 性史性dvd影片农村毛片 | 成人免费区一区二区三区 | 一级毛片aa | 香蕉视频污在线观看 |