CSS边框与背景[上]
2016-08-04 16:21
162 查看
效果:
index.html:
<!DOTTYPE html>
<html lang ="zh-cn">
<head>
<meta charset="utf-8">
<title>CSS盒边框和背景[上]</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
</body>
</html>
style.css:
@charset "utf-8";
div{
width:200px;
height:200px;
///设置一个边框至少需要以下三条
border-style:solid;
bordr-color:red;
border-width:1px;///用像素最好
///或者将那三条写成一条语句
border:10px solid red;
border-radius:10px;///圆角边框
border-radius:10px 20px 30px 40px;///圆角边框顺时针
border-top-right-radius:10px;///仅仅对右上边框设置圆角
///没有直接像素好用
border-width:thin;
border-width:thick;
border-width:10px;///用像素最好
border-style:none;
border-style:dashed;///破折号边框
border-style:dotted;///圆点边框
border-style:double;///双线边框
///立体感边框
border-style:groove;
border-style:ginset;
border-style:outset;
border-style:ridge;
///最常用边框
border-style:solid;///实线
border-style:dashed;///破折号边框虚线
///单独某条边框设置
border-top:10px solid red;///上边的一条边框
ppt:
index.html:
<!DOTTYPE html>
<html lang ="zh-cn">
<head>
<meta charset="utf-8">
<title>CSS盒边框和背景[上]</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
</body>
</html>
style.css:
@charset "utf-8";
div{
width:200px;
height:200px;
///设置一个边框至少需要以下三条
border-style:solid;
bordr-color:red;
border-width:1px;///用像素最好
///或者将那三条写成一条语句
border:10px solid red;
border-radius:10px;///圆角边框
border-radius:10px 20px 30px 40px;///圆角边框顺时针
border-top-right-radius:10px;///仅仅对右上边框设置圆角
///没有直接像素好用
border-width:thin;
border-width:thick;
border-width:10px;///用像素最好
border-style:none;
border-style:dashed;///破折号边框
border-style:dotted;///圆点边框
border-style:double;///双线边框
///立体感边框
border-style:groove;
border-style:ginset;
border-style:outset;
border-style:ridge;
///最常用边框
border-style:solid;///实线
border-style:dashed;///破折号边框虚线
///单独某条边框设置
border-top:10px solid red;///上边的一条边框
ppt:
相关文章推荐
- css随记01编辑技巧,背景与边框
- CSS的边框和背景属性
- css实现可扩展的图片背景圆角边框,在IE6,IE7,Firefox下通过测试
- CSS.textarea无边框且背景透明
- CSS样式设置语法全解,样式优先级、值和单位、字体、文本、块级元素,行内元素,替换元素、非替换元素、display、float、position、table、li、光标、边距边框、轮廓、颜色背景
- CSS边框与背景
- CSS边框、背景、文本样式
- div+css总结—FF下div不设置高度背景颜色或外边框不能显示的解决方法 (新浪博客 )
- CSS实现表格边框阴影和背景渐变效果
- Android程序员学WEB前端(7)-CSS(2)-伪类字体文本背景边框-Sublime
- CSS自学笔记(11):CSS3背景和边框
- css背景、边框
- CSS边框和背景
- 未设置高度的容器背景和边框不显示问题(CSS)
- DIV+CSS颜色边框背景等样式
- CSS的背景属性和边框属性
- CSS的背景属性和边框属性
- css练习之边框、框模型、背景属性
- div+css总结—FF下div不设置高度背景颜色或外边框不能正常显示的解决方法(借鉴)
- css完整总结:第二篇(尺寸,外补白,内补白,边框,背景,颜色,字体,文本,文本装饰)