HTML+CSS+JS实现 ❤️响应式团队❤️
生活随笔
收集整理的這篇文章主要介紹了
HTML+CSS+JS实现 ❤️响应式团队❤️
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?效果演示:
?
???代碼目錄:
主要代碼實現:
CSS樣式:
body {margin: 0;min-height: 100vh;display: flex;justify-content: center;align-items: center;background-color: #f7f7f7; }.section-heading {font-family: "Dancing Script", cursive;text-align: center;font-size: 64px;color: #10996d;margin: 0 0 70px; }.container {display: flex;justify-content: center;width: 90%;max-width: 1440px;margin: 0 auto; }.profile {position: relative;transition: all 0.3s; }.profile:hover {transform: translateY(25px); }.profile img {max-width: 100%;border-radius: 50%;border: 5px solid #f7f7f7;filter: drop-shadow(-20px 0 10px rgba(0, 0, 0, 0.1));cursor: pointer; }.profile:not(:first-child) img {margin-left: -20px; }.profile .name {position: absolute;background-color: #10996d;color: #fff;font-family: "Bebas Neue", cursive;padding: 15px 30px;border-radius: 100px;bottom: -80px;left: 50%;white-space: nowrap;transform: translate(-50%, -50px);letter-spacing: 1px;font-size: 20px;opacity: 0;transition: all 0.3s; }.profile .name::before {content: "";position: absolute;width: 15px;height: 15px;background-color: #10996d;top: 0;left: 50%;transform: translate(-50%, -50%) rotate(45deg); }.profile img:hover+.name {opacity: 1;transform: translateX(-50%);box-shadow: 0 10px 20px rgba(86, 86, 198, 0.3); }部分HTML代碼 :
<!DOCTYPE html> <html lang="en"><head><meta charset="UTF-8"><title>Team Profile Hover Effect</title><link rel="stylesheet" href="css/style.css"></head><body><section class="team"><h2 class="section-heading">響應式團隊</h2><div class="container"><div class="profile"><img src="img/1.jpg" alt="" /><span class="name">Kalyan</span></div><div class="profile"><img src="img/2.jpg" alt="" /><span class="name">Suchitra Tiwari</span></div><div class="profile"><img src="img/3.jpg" alt="" /><span class="name">Sajid Ghani</span></div><div class="profile"><img src="img/4.jpg" alt="" /><span class="name">Dhriti</span></div><div class="profile"><img src="img/5.jpg" alt="" /><span class="name">Milind</span></div><div class="profile"><img src="img/6.jpg" alt="" /><span class="name">Srikant Tiwari</span></div><div class="profile"><img src="img/7.jpg" alt="" /><span class="name">Major Sameer</span></div></div></section></body></html>上面的img圖片等需要引入即可運行
源碼獲取
查看博主主頁或私信博主獲取
精彩推薦更新中:
HTML5大作業實戰100套
??打卡 文章 更新? 39??/? 100天
大家可以點贊、收藏、關注、評論我啦 、需要完整文件隨時聯系我或交流喲~!
總結
以上是生活随笔為你收集整理的HTML+CSS+JS实现 ❤️响应式团队❤️的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 7 centos 时钟跟物理机同步_ce
- 下一篇: oracle 设置输出显示中文乱码,修改