CSS的样式结合应用
来源:互联网 发布:stc90c52rc单片机资料 编辑:程序博客网 时间:2024/05/05 17:27
CSS的样式结合应用
1.无序列表。
list-style-type: none; list-style-image: url(1.png);}
2.Table
border-bottom: #0C0 double 6px; /*虚实线*/ border-left: #0C0 solid 6px; /*实线*/ border-right: #0C0 solid 6px; border-top: #0C0 solid 6px; width: 500px; }table td{ border: #FF0 double 3px; padding: 20px; /*内边距,文字与table之间间距*/ margin: 5px; /*外边距,单元格之间间距*/}
除了表格,其他只要是区域都可以设置边界属性(div)
表格中输入效果
<tr> <td>name:<input type="text"/ class="ced"></td> <td>number:<input type="text"/ class="ced"></td> <td>password:<input type="text"/ class="bef"></td> </tr> <tr> <td>单元格二一</td> <td>单元格二二</td> <td>单元格二三</td> </tr></table>/*in html*/input.ced{ border: none; border-left: #000 3px solid; border-right: #000 3px solid; border-top: #000 3px solid; border-bottom: #CF9 6px solid;}input.bef{ border: none; border-left: #845 3px solid; border-right: #854 3px solid; border-top: #854 3px solid; border-bottom: #AB9 6px solid;}/*in third.css*/
3.Filter滤镜
View the code.
CSS盒子模型box
Div+css
Use html and id selector
1.边框:border
{top right bottom left }
height: 100px; width: 200px; border: #09F solid 2px;}
2.内边距:padding
{top right…}
height: 100px; width: 200px; border: #09F solid 2px; padding: 40px 40px 40px 40px; /* 1上下左右 2.1上下 2.2左右 3.1上 3.2左右 3.3下 4上右下左(顺时针)*/ /*margin: 10px ;*/}
3.外边距:margin
{top …}
可以设置body的外边距
background-color: #000; color: #FFF; border-bottom: #09F solid 6px; border-top: #09F solid 6px; border-left: #09F solid 6px; border-right: #09F solid 6px; margin: 0px ;}#div-2{}#div-3{}body{ margin: 0px;}
CSS布局
A:漂浮float|none|left|right
*none:默认不漂浮
*left:文本流向对象右边
*right:文本流向对象左边
background-color: #000; color: #FFF; float: left;}
Clear:none|left|right|both
left:不允许左边有浮动对象
Right:不允许右边有浮动对象
Both:不允许有浮动对象
B:定位position
Position:static|absolute|fixed|relative
static|默认
absolute|绝对:从文档流中拖出,漂浮在空中
background-color: #000; color: #FFF; position: absolute; top: 50px; left: 200px;} //可以飞动;
没有指定父本,相对body而言
fixed|
Relative|对象不可层叠,在正常的文档流中偏移位置。
background-color: #000; color: #FFF; position: relative; top: 50px; left: 200px;}
C:图文混排
D:图像签名
0 0
- CSS的样式结合应用
- CSS样式的结合应用
- 30-CSS-07-CSS(CSS样式的结合应用)
- html css样式结合应用
- CSS入门系列(四)CSS样式的结合应用
- 浅谈RSS与样式的结合应用
- css样式的简单应用
- JavaScript结合CSS样式实现可折叠区域的例子
- JQuery结合CSS操作打印样式的方法
- JQuery结合CSS操作打印样式的方法
- css样式中三角形的应用
- CSS样式中部分伪类选择器的应用
- css样式中 border的应用
- CSS样式应用积累
- css样式应用顺序
- 利用CSS样式加载图像的做法(CSS应用技巧)
- CSS和JS结合控制样式
- css(层叠样式表)和html结合的四种方式
- 命名实体识别
- 前端学习资源收集
- 多线程学习
- 九种经典排序算法汇总
- 剑指offer系列-二维数组中的查找
- CSS的样式结合应用
- JS——声明式函数与赋值式函数
- Android 探究 LayoutInflater setFactory
- 基于机器学习的数字识别服务端
- 设计模式之组合模式
- Android Studio断点调试
- 天翼杯大数据算法应用大赛
- Perl中读取含有中文的路径 或 含有中文的文件名
- 如何处理List of devices attached为空的问题