900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > css如何实现边框长度控制功能

css如何实现边框长度控制功能

时间:2023-02-21 14:39:04

相关推荐

css如何实现边框长度控制功能

web前端|css教程

css,边框

web前端-css教程

小猪o2o最新版源码,vscode终端shell,ubuntu服务器打开网络端口,tomcat 6 exe,c sqlite 码源,js树插件treeview,前端ue框架,爬虫博客文章文本内容,php iis环境配置,延边谷歌seo,网站视频插件,优秀网页设计模板,仿微信的模板lzw

以前需要边框长度比容器小一些时,我用div嵌套。后来发现伪类在实现这个效果时很方便,只需要一个div就够了,另外调整padding和margin都不会很麻烦。

招商加盟单页源码,vscode 窗口排列,linux和ubuntu的区别,tomcat 启动闪退,java sqlite类,初级网页设计师基础,数据库删除语句,国外 服务器,wordpress菜单插件,前端pc端框架,应用宝爬虫,php数组合并,seo资料站,登录springboot,动易首页导航栏标签$installdir,网站 wordpress,易语言网页自动填表,dede自适应模板 文章,dede后台演示路径,手机端页面跳转页面跳转页面,开源 物资管理系统,开源程序建站视频教程下载lzw

(推荐教学:CSS入门教学)

html源码水果忍者,ubuntu系统的好处,java爬虫 下载视频,wiringpi -php,seo顶级算法lzw

border top

border left

border right

border bottom

.box-container { position: relative; width: 90%; color: #777;}.border-top { background: #b4bcbf; padding: 15px;} .border-top:before { content: \; position: absolute; left: 42%; top: 0; bottom: auto; right: auto; height: 7px; width: 50%; background-color: #8796a9; }.border-left { background: #dfdad6; padding: 15px;} .border-left:before { content: \; position: absolute; left: 0; top: 6%; bottom: auto; right: auto; height: 52%; width: 5px; background-color: #a89d9e; }.border-right { background: #eee9c4; padding: 15px;} .border-right:after { content: \; position: absolute; left: auto; top: auto; bottom: 5px; right: 0; height: 52%; width: 5px; background-color: #f39c81; }.border-bottom { background: #bcdc9d; padding: 15px;} .border-bottom:after { content: \; position: absolute; left: 18px; top: auto; bottom: 0; right: auto; height: 6px; width: 105px; background-color: #32b66b; }

效果如下图:

相关视频教学推荐:css视频教学

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