時(shí)間:2023-06-08 20:09:02 | 來源:網(wǎng)站運(yùn)營
時(shí)間:2023-06-08 20:09:02 來源:網(wǎng)站運(yùn)營
大一學(xué)生HTML5期末大作業(yè)——基于HTML+CSS制作中藥主題實(shí)訓(xùn)素材:?> ? 源碼獲取 文末聯(lián)系 ?Web前端開發(fā)技術(shù) 描述 網(wǎng)頁設(shè)計(jì)題材,DIV+CSS 布局制作,HTML+CSS網(wǎng)頁設(shè)計(jì)期末課程大作業(yè) 茶文化網(wǎng)站 | 中華傳統(tǒng)文化題材 | 京劇文化水墨風(fēng)書畫 | 中國民間年畫文化藝術(shù)網(wǎng)站 | 等網(wǎng)站的設(shè)計(jì)與制作 | HTML期末大學(xué)生網(wǎng)頁設(shè)計(jì)作業(yè)
<!DOCTYPE html><html><head> <meta charset="UTF-8" /> <title>首頁</title> <link href="css/main.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="css/font/iconfont.css" /> <link rel="stylesheet" href="css/major.css" /> <style> /* 輪播樣式 */ /* #region */ .swiper { width: 1000px; height: 400px; margin: 0 auto; overflow: hidden; position: relative; margin-top: 65px; } .swiper>.lb { background-position: center; background-repeat: no-repeat; background-size: cover; height: 400px; width: 100%; } .swiper>.lb:nth-child(1) { background-image: url('images/main/1.jpg'); } .swiper>.lb:nth-child(2) { background-image: url('images/main/2.jpg'); } .swiper>.lb:nth-child(3) { background-image: url('images/main/3.jpg'); } .swiper>.lb_btn { width: 50px; height: 50px; position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); cursor: pointer; background-position: center; background-repeat: no-repeat; background-size: 100%; } .swiper>.l { left: 8px; background-image: url('images/icon/l.png'); } .swiper>.r { right: 8px; background-image: url('images/icon/r.png'); } .swiper>.lb_bottom { position: absolute; bottom: 0; width: 100%; height: 25px; } .swiper>.lb_bottom>.lb_point { width: 80px; z-index: 4; height: 20px; margin: 0 auto; display: flex; justify-content: center; align-items: center; } .swiper>.lb_bottom>.lb_point>span { display: inline-block; width: 8px; height: 8px; border-radius: 8px; background-color: #808080; margin-left: 5px; margin-right: 5px; } .hiddle { display: none; } .swiper>.lb_bottom>.lb_point>.poAct { background-color: #007aff; } /* #endregion */ /* 廣告樣式 */ /* #region */ .adv { width: 100%; height: 60px; margin: 0; margin-top: 10px; position: relative; } .adv>.adv_item { height: 100%; width: 100%; background-position: center; background-repeat: no-repeat; background-size: 100%; } .adv>.adv_img1 { background-image: url('images/adv/1.jpg'); } .adv>.adv_img2 { background-image: url('images/adv/2.jpg'); } .adv>.adv_img3 { background-image: url('images/adv/3.jpg'); } .sw_adv { position: absolute; right: 10px; top: 5px; z-index: 2; color: #086879; background-color: #a09090a6; border-radius: 2px; padding-left: 2px; padding-right: 2px; } .sw_adv>.icon-cuowu { margin-left: 8px; } .sw_adv>.icon-cuowu:hover { cursor: pointer; } /* #endregion */ /* main樣式 */ .yemian { margin-bottom: 10px; } </style></head><body> <div> <!-- 導(dǎo)航欄 --> <nav class="myNavbar"> <div class="nav_container"> <div class="container_l"> <div class="logo item"><a href="index.html"></a></div> <div class="item item_act"><a href="index.html">首頁</a></div> <div class="item"><a href="introduce.html">中藥介紹</a></div> <div class="item"><a href="development.html">中藥發(fā)展史</a></div> <div class="item"><a href="varieties.html" id="user_center">中藥品種</a></div> </div> </div> </nav> <!-- 輪播 --> <div class="swiper"> <div class="lb" index="1"></div> <div class="hiddle lb" index="2"></div> <div class="hiddle lb" index="3"></div> <div class="l lb_btn"></div> <div class="r lb_btn"></div> <div class="lb_bottom"> <div class="lb_point"> <span index="1" class="lb_po poAct"></span> <span index="2" class="lb_po"></span> <span index="3" class="lb_po"></span> </div> </div> </div> <!-- main package --> <div class="yemian"> <div class="kuang"> <div class="wenzi"> <p> 以中國傳統(tǒng)醫(yī)藥理論指導(dǎo)采集、炮制、制劑,說明作用機(jī)理,指導(dǎo)臨床應(yīng)用的藥物,統(tǒng)稱為中藥。簡而言之,中藥就是指在中醫(yī)理論指導(dǎo)下,用于預(yù)防、治療、診斷疾病并具有康復(fù)與保健作用的物質(zhì)。中藥主要來源于天然藥及其加工品,包括植物藥、動(dòng)物藥、礦物藥及部分化學(xué)、生物制品類藥物。由于中藥以植物藥居多,故有“諸藥以草為本”的說法。 </p> </div> </div> <div class="tu"> <div class="t"> <a href="javascript:void()"><img class="an_img" src="images/1.jpg" width="323" height="270" /></a> </div> <div class="t"> <a href="javascript:void()"><img class="an_img" src="images/2.jpg" width="323" height="270" /></a> </div> <div class="t"> <a href="javascript:void()"><img class="an_img" src="images/3.jpg" width="323" height="270" /></a> </div> <div class="t"> <a href="javascript:void()"><img class="an_img" src="images/20.jpg" width="323" height="270" /></a> </div> <div class="t"> <a href="javascript:void()"><img class="an_img" src="images/21.jpg" width="323" height="270" /></a> </div> <div class="t"> <a href="javascript:void()"><img class="an_img" src="images/22.jpg" width="323" height="270" /></a> </div> </div> <div class="clearit"></div> </div> <div class="banquan"> <p>Copyright ?2022 姓名:xxx 學(xué)號(hào):xxxx</p> </div> <!-- 返回頂部 --> <div class="to" id="to_top"> <a href="#top" title="返回頂部"> <span class="iconfont icon-huojianxianxing"></span> </a> </div> </div></body><script> // 輪播 //#region // nodeList轉(zhuǎn)為數(shù)組 let imgList = Array.from(document.querySelectorAll('.lb')) let poList = Array.from(document.querySelectorAll('.lb_po')) let currentIndex = 1 let timerID = '' // 計(jì)時(shí)器id document.querySelector('.l').onclick = function() { changeImg('l') reSwiper() } document.querySelector('.r').onclick = function() { changeImg('r') reSwiper() } // 自動(dòng)輪播 function autoSwiper() { timerID = window.setInterval(function() { changeImg('r') }, 3000) } autoSwiper() // 刷新輪播 function reSwiper() { window.clearInterval(timerID) autoSwiper() } // 改變圖片 function changeImg(dir) { imgHiddle() if (dir == 'l') { currentIndex = currentIndex == 1 ? 3 : currentIndex - 1 } else { currentIndex = currentIndex == 3 ? 1 : currentIndex + 1 } imgList.some(function(e, i) { let ind = e.getAttribute('index') if (currentIndex == ind) { e.classList.remove('hiddle') poList[i].classList.add('poAct') return true } }) } // 清除樣式 function imgHiddle() { imgList.forEach(function(e, i) { e.classList.remove('hiddle') e.classList.add('hiddle') poList[i].classList.remove('poAct') // 清除小點(diǎn)的樣式 }) } //#endregion</script></html>
關(guān)鍵詞:主題,素材,學(xué)生,作業(yè),中藥
客戶&案例
營銷資訊
關(guān)于我們
微信公眾號(hào)
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。