新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
CSS3怎么實現(xiàn)菜單懸停效果-創(chuàng)新互聯(lián)
這篇文章主要講解了“CSS3怎么實現(xiàn)菜單懸停效果”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“CSS3怎么實現(xiàn)菜單懸停效果”吧!
實現(xiàn)效果:
html
css
@import url(https://fonts.googleapis.com/css?family=Raleway); body { margin: 0px; } nav { margin-top: 40px; padding: 24px; text-align: center; font-family: Raleway; box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); } #nav-1 { background: #3fa46a; } #nav-2 { background: #5175C0; } #nav-3 { background: #EEA200; } .link-1 { transition: 0.3s ease; background: #3fa46a; color: #ffffff; font-size: 20px; text-decoration: none; border-top: 4px solid #3fa46a; border-bottom: 4px solid #3fa46a; padding: 20px 0; margin: 0 20px; } .link-1:hover { border-top: 4px solid #ffffff; border-bottom: 4px solid #ffffff; padding: 6px 0; } .link-2 { transition: 0.6s; color: #ffffff; font-size: 20px; text-decoration: none; border-right: 2px dotted transparent; padding: 30px 8px 0 10px; margin: 0 10px; } .link-2:hover { border-right: 2px dotted #ffffff; padding-bottom: 24px; } .link-3 { transition: 0.4s; color: #ffffff; font-size: 20px; text-decoration: none; padding: 0 10px; margin: 0 10px; } .link-3:hover { background-color: #ffffff; color: #EEA200; padding: 24px 10px; }
感謝各位的閱讀,以上就是“CSS3怎么實現(xiàn)菜單懸停效果”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對CSS3怎么實現(xiàn)菜單懸停效果這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是創(chuàng)新互聯(lián)網(wǎng)站建設(shè)公司,,小編將為大家推送更多相關(guān)知識點的文章,歡迎關(guān)注!
本文名稱:CSS3怎么實現(xiàn)菜單懸停效果-創(chuàng)新互聯(lián)
本文URL:http://www.dlmjj.cn/article/docope.html