分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

css盒子模型之边框

发布时间:2023-09-06 01:56责任编辑:蔡小小关键词:盒子模型
 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 ????<meta charset="UTF-8"> 5 ????<title>Document</title> 6 ????<style type="text/css"> 7 ????????.box{ 8 ????????????width:300px; 9 ????????????height: 390px;10 ????????????background-color:pink;11 ?????????????border-top-style:solid;/* 线型 */12 ????????????border-top-color:red;/* 上边框颜色 */13 ????????????border-top-width:5px;/* 上边框粗细 */14 15 ????????????border-bottom-style:dotted;/* 点线 */16 ????????????border-bottom-color:blue;17 ????????????border-left-style:dashed;/* 虚线 */18 ????????????border-left-color:#467890; 19 ????????????/* 四个边框都一样 */20 ????????????border:5px solid blue;21 ????????}22 ????</style>23 </head>24 <body>25 ????<div class="box">距离</div>26 </body>27 </html>

css盒子模型:
1.边框 border
 border-top-style(线型):solid(实线)
                  dotted(点线)
                    dashed(虚线)
 border-top-color(边框颜色)
 border-top-width(边框粗细)

2.边框属性简写:
 border-top:5px solid red;
 特点:没有顺序限制.线型为必写项
 四个边框相同的时候写法:
 border:5px solid red
 特点:没有顺序要求。线型为必写项

css盒子模型之边框

原文地址:https://www.cnblogs.com/twinkle-/p/9096673.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved