之前为大家介绍了好几款导航菜单,今天再给大家带来一款css3实现的幽灵按钮式的导航菜单。导航界面非常好看。右侧是一个css3实现的动画消息图标。效果图如下:
在线预览 源码下载
实现代码:
html代码:
<header> <nav> <a>Home</a> <a>Words</a> <a>Activity</a> <a>Discussion</a> <a>Immersion</a> </nav> <button class="notif"> <span class="icon"></span> </button> </header>
css3代码:
* { margin: 0; padding: 0;}body { background: #e9e9e9; overflow: hidden;}header { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; background-color: #1CAFF6; background-color: rgba(32, 166, 231, 0.8); background-image: -webkit-gradient(linear, left top, left bottom, from(#20A8E9), to(rgba(30, 158, 220, 0.5))); background-image: -webkit-linear-gradient(top, #20A8E9, rgba(30, 158, 220, 0.5)); background-image: linear-gradient(to bottom, #20A8E9, rgba(30, 158, 220, 0.5)); padding: 0 50px;}main { background: white; height: 100vh; border-radius: 10px; margin: 30px 55px; background: 0 0 25px rgba(0, 0, 0, 0.04);}nav { -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; font: 500 15px/20px "museo-sans-rounded", sans-serif; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; overflow: hidden; padding: 17px 0;}a { display: inline-block; padding: 10px 18px 8px; margin: 0 2px; border-radius: 100px; color: white; cursor: pointer; -webkit-animation: nav-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1.1) backwards; animation: nav-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1.1) backwards; -webkit-transition: background 0.35s; transition: background 0.35s;}a:hover { background: #1493D1; -webkit-transition: 0; transition: 0;}a:active { background: #107aad;}a:nth-child(1) { -webkit-animation-delay: 0.46667s; animation-delay: 0.46667s;}a:nth-child(2) { -webkit-animation-delay: 0.58333s; animation-delay: 0.58333s;}a:nth-child(3) { -webkit-animation-delay: 0.7s; animation-delay: 0.7s;}a:nth-child(4) { -webkit-animation-delay: 0.81667s; animation-delay: 0.81667s;}a:nth-child(5) { -webkit-animation-delay: 0.93333s; animation-delay: 0.93333s;}@-webkit-keyframes nav-in { from { -webkit-transform: translate3d(0px, 100px, 0); transform: translate3d(0px, 100px, 0); }}@keyframes nav-in { from { -webkit-transform: translate3d(0px, 100px, 0); transform: translate3d(0px, 100px, 0); }}.notif { display: inline-block; border-radius: 50%; background: #1392D0; padding: 7px 9px; width: 40px; height: 40px; border: 0; cursor: pointer; -webkit-transition: 0.35s; transition: 0.35s;}.notif:hover { background: #0e6d9c; -webkit-transition-duration: 0.0875s; transition-duration: 0.0875s; -webkit-transform: scale(1.1); -ms-transform: scale(1.1); transform: scale(1.1);}.notif:active, .notif:focus { -webkit-transition-duration: 0; transition-duration: 0; -webkit-transform: scale(1.15); -ms-transform: scale(1.15); transform: scale(1.15); background: #0b577c; outline: 0;}.notif .icon { display: inline-block; width: 22px; height: 26px; background-image: url("icon.png"); -webkit-animation: notif 2s cubic-bezier(0.17, 0.67, 0.4, 1.17) infinite; animation: notif 2s cubic-bezier(0.17, 0.67, 0.4, 1.17) infinite; -webkit-background-size: 1000px 1000px; background-size: 1000px 1000px; background-position: -340px -40px;}@-webkit-keyframes notif { 10%, 30% { -webkit-transform: rotate(-25deg); transform: rotate(-25deg); } 20%, 40% { -webkit-transform: rotate(25deg); transform: rotate(25deg); } 50%, 100% { -webkit-transform: none; transform: none; }}@keyframes notif { 10%, 30% { -webkit-transform: rotate(-25deg); transform: rotate(-25deg); } 20%, 40% { -webkit-transform: rotate(25deg); transform: rotate(25deg); } 50%, 100% { -webkit-transform: none; transform: none; }}

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

HTML的未来将朝着更加语义化、功能化和模块化的方向发展。1)语义化将使标签更明确地描述内容,提升SEO和无障碍访问。2)功能化将引入新元素和属性,满足用户需求。3)模块化将支持组件化开发,提高代码复用性。

htmlattributesarecrucialinwebdevelopment forcontrollingBehavior,外观和功能

alt属性是HTML中标签的重要部分,用于提供图片的替代文本。1.当图片无法加载时,alt属性中的文本会显示,提升用户体验。2.屏幕阅读器使用alt属性帮助视障用户理解图片内容。3.搜索引擎索引alt属性中的文本,提高网页的SEO排名。

HTML、CSS和JavaScript在网页开发中的作用分别是:1.HTML用于构建网页结构;2.CSS用于美化网页外观;3.JavaScript用于实现动态交互。通过标签、样式和脚本,这三者共同构筑了现代网页的核心功能。

设置标签的lang属性是优化网页可访问性和SEO的关键步骤。1)在标签中设置lang属性,如。2)在多语言内容中,为不同语言部分设置lang属性,如。3)使用符合ISO639-1标准的语言代码,如"en"、"fr"、"zh"等。正确设置lang属性可以提高网页的可访问性和搜索引擎排名。

htmlattributeseresene forenhancingwebelements'functionalityandAppearance.TheyAdDinformationTodeFineBehavior,外观和互动,使网站互动,响应式,visalalyAppealing.AttributesLikutesLikeSlikEslikesrc,href,href,href,类,类型,类型,和dissabledtransfransformformformformformformformformformformformformformformforment

toCreateAlistinHtml,useforforunordedlistsandfororderedlists:1)forunorderedlists,wrapitemsinanduseforeachItem,RenderingeringAsabulleTedList.2)fororderedlists,useandfornumberedlists,useandfornumberedlists,casundfornumberedlists,customeizableWithTheTtheTthetTheTeTeptTributeFordTributeForderForderForderFerentNumberingSnumberingStyls。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

安全考试浏览器
Safe Exam Browser是一个安全的浏览器环境,用于安全地进行在线考试。该软件将任何计算机变成一个安全的工作站。它控制对任何实用工具的访问,并防止学生使用未经授权的资源。

DVWA
Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中

Dreamweaver Mac版
视觉化网页开发工具

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能