登录
/
注册
首页
论坛
其它
首页
科技
业界
安全
程序
广播
Follow
关于
签到
每天签到奖励2-10圆
导读
排行榜
TG频道
发帖说明
登录
/
注册
账号
自动登录
找回密码
密码
登录
立即注册
搜索
搜索
关闭
CSDN热搜
程序园
精品问答
技术交流
资源下载
本版
帖子
用户
软件
问答
教程
代码
写记录
VIP申请
VIP网盘
网盘
联系我们
发帖说明
每日签到
道具
勋章
任务
淘帖
动态
分享
留言板
导读
设置
我的收藏
退出
腾讯QQ
微信登录
返回列表
首页
›
资源区
›
代码
›
01html导航菜单,可倾斜的导航菜单设计css ...
CSS3
01html导航菜单,可倾斜的导航菜单设计css
[ 复制链接 ]
新程序
2025-6-7 12:31:01
01html导航菜单,可倾斜的导航菜单设计css
游客,如果您要查看本帖隐藏内容请
回复
css
@import url('https://fonts.googleapis.com/css?family=IM+Fell+English+SC');
:root {
font-size:0.625em;
}
/*
layout
*/
html,body {min-height:100vh}
body {
display:flex;
flex-flow:column nowrap;
justify-content:center;
align-items:center;
}
/*
Counters
*/
.menu ol {
counter-reset:menu;
}
/*
Regular menu items
*/
.menu-item a {
display:flex;
justify-content:flex-start; /*shrink towards text*/
color:currentColor;
text-decoration:none;
padding:0.3rem 0; /* avoid flickin' */
order:0;
}
.menu-item a::before { /* dots */
content:"";
display:block;
border-bottom:1px dotted black;
position:relative; top:-3px;
flex:1 1 auto;
margin:0 1rem;
order:1;
}
.menu-item a::after { /* item ids */
counter-increment:menu;
content:counters(menu, ".");
flex:0 0 auto;
order:2;
transform:rotate(30deg)scale(1.2);
text-decoration:underline;
}
/*
Sub menu & items
*/
.sub-menu {
font-size:1.6rem;
font-weight:normal;
}
.sub-menu > li > a {
text-indent:0ch; /*
Chrome indentS the "dots" elm, i.e. it counts pseudo-elm.
FF and Edge indents first non pseudo-elm.
Turn it off for consistency.
*/
padding:0.5rem 0 0.5rem 2ch;
margin:0;
}
/*
Main menu
*/
.menu {
width:22vw;
min-width:20ch;
display:flex;
flex-flow:column nowrap;
font:bold 2.4rem/1 'IM Fell English SC', serif;
position:relative;
transform:rotate(-30deg);
}
.menu::before {
content:"/";
align-self:center;
transform:rotate(30deg);
margin-bottom:1rem;
}
.menu::after {
content:"/";
align-self:center;
transform:rotate(30deg);
margin-top:1rem;
}
/*
Fx
*/
.menu { transition:transform 0.3s; }
.menu:hover { transform:rotate(0); }
.menu::before { transition:transform 0.5s; }
.menu:hover::before { transform:rotate(0); content:"__"; }
.menu::after { transition:transform 0.5s; }
.menu:hover::after { transform:rotate(0); content:"__"; }
.menu .menu-item a::after { transition:transform 0.3s }
.menu:hover .menu-item a::after { transform:rotate(0) }
.menu:hover > ol > .menu-item { opacity:0.3; }
.menu-item:hover {
transition:background-color 0.3s;
background:rgba(255,255,0,0.15);
opacity:1 !important;
}
.menu-item:hover a::after {
text-decoration:none;
}
.menu-item:hover > a::before {
transition:flex-grow 0.3s;
width:0; flex-grow:0;
transform-origin:center bottom;
}
/*
Collapse
*/
.sub-menu > .menu-item {
max-height:1ch;
transform:scaleY(0.1);
transform-origin:center top;
transition:transform 0.2s, max-height 0.5s;
}
.menu:hover .sub-menu .menu-item {
max-height:10em;
transform:scaleY(1);
}
复制代码
导航
菜单
01html
倾斜
设计
相关帖子
理解WPF Stylet中Command="{s:Action 方法名}"的设计与实现
Flutter实现闲鱼底部导航栏中间突出效果
基于 SocketIO 消息协议设计报文规范,构建FastAPI上的SocketIO 应用
今日主题:数据库设计过程-概念结构设计阶段]
读发布!设计与部署稳定的分布式系统(第2版)笔记04_集成点
读发布!设计与部署稳定的分布式系统(第2版)笔记03_让系统稳定运行
如何设计一条稳定的应用交付流程?|云效工程师指北
读发布!设计与部署稳定的分布式系统(第2版)笔记06_用户
产品经理必看:原型设计工具三大能力解析(交互/AI/素材库)
读发布!设计与部署稳定的分布式系统(第2版)
vip免费申请,1年只需15美金$
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
千斤顶
照妖镜
相关推荐
业界
理解WPF Stylet中Command="{s:Action 方法名}"的设计与实现
0
900
石娅凉
2025-10-01
业界
Flutter实现闲鱼底部导航栏中间突出效果
0
603
聱嘹
2025-10-02
业界
基于 SocketIO 消息协议设计报文规范,构建FastAPI上的SocketIO 应用
1
662
季卓然
2025-10-02
安全
今日主题:数据库设计过程-概念结构设计阶段]
0
613
孔季雅
2025-10-03
安全
读发布!设计与部署稳定的分布式系统(第2版)笔记04_集成点
0
993
梁丘眉
2025-10-05
安全
读发布!设计与部署稳定的分布式系统(第2版)笔记03_让系统稳定运行
0
52
翳舀
2025-10-06
安全
如何设计一条稳定的应用交付流程?|云效工程师指北
0
54
存叭
2025-10-07
安全
读发布!设计与部署稳定的分布式系统(第2版)笔记06_用户
0
7
荦绅诵
2025-10-08
安全
产品经理必看:原型设计工具三大能力解析(交互/AI/素材库)
0
826
普料飕
2025-10-09
安全
读发布!设计与部署稳定的分布式系统(第2版)
0
649
许娴广
2025-10-10
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
立即注册
回复
本版积分规则
回帖并转播
回帖后跳转到最后一页
浏览过的版块
业界
安全
发帖
新程序
2025-6-7 12:31:01
关注
4
粉丝关注
946
主题发布
板块介绍填写区域,请于后台编辑
财富榜{圆}
anyue1937
9999501
dage888
999994
富账慕
10007
4
匝抽
9986
5
孙淼淼
9992
6
柴古香
9993
7
筒濂
9982
8
凌彦慧
9991
9
崔瑜然
9984
10
慢秤
9979
查看更多