900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > css怎么设置侧边栏

css怎么设置侧边栏

时间:2023-08-13 17:18:56

相关推荐

css怎么设置侧边栏

web前端|css教程

css

web前端-css教程

asp删除记录 源码,让vscode代码提示,隐藏ubuntu左侧,测试框架tomcat,qt如何连接sqlite3,爬虫采集遇到问题怎么办,o2o php源码,永州seo优化分析,独立网站开发模板,模板巴士下载lzw

本文操作环境:windows7系统、HTML5&&CSS3版、Dell G3电脑。

老罗android 源码,vscode怎么改成中文的,ubuntu 引导记录,tomcat导入项目报错,爬虫有用应用,高并发php框架,珠海市商品seo优化品牌,手机新闻网站模板lzw

css怎么设置侧边栏?

电子作品评价 asp源码,Ubuntu查看当时桌面,熟悉tomcat什么意思,网络爬虫epoll,进贤PHP培训,济南百度优化seo推广外包费用lzw

CSS实现侧边栏导航

/*隐藏checked复选框*/ #sidemenu{display: none; } #sidemenu:checked + aside {/*为被选中的sidemenu后的aside设置属性(紧邻)*/left: 0;/*点击按钮即选中checked后,侧边栏位置变为贴着左边,配合ease-out使用,有渐变滑出的效果*/ } #sidemenu:checked ~ #wrap {/*为被选中的sidemenu后的wrap设置属性(非紧邻)*/padding-left: 220px; } aside {/*侧边栏,初始位置为-200px,即隐藏效果*/position: absolute;top: 0;bottom: 0;left: -200px;width: 200px;background: black;transition: 0.2s ease-out;/*动画效果的执行方式是ease-out,即侧边栏滑动效果为渐变式,而不是生硬的突然变化*/ } h2 {color: white;text-align: center;font-size: 2em; } /*控制侧边栏进出的按钮(外部包裹)*/ #wrap {margin-left: 20px;padding: 10px;transition: 0.2s ease-out; } /*控制侧边栏进出的按钮(内部文字样式)*/ label {/*控制侧边栏进出的按钮*/background: white;border-radius: 70px;color: orange;cursor: pointer;display: block;font-family: Courier New;font-size: 2em;width: 1.5em;height: 1.5em;line-height: 1.5em;text-align: center;display: inline-block; } label:hover {background: #000; } #sideul li {list-style: none;color: white;width: 100%;height: 1.8em;font-size: 1.5em;text-align: center; } a {text-decoration: none; } #sideul li:hover {color: orange; } 主菜单

首页 导航1 导航2 导航3 导航4 导航5 导航6ʳ

【推荐学习:《css视频教学》】

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。