CSS border边框取值

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        /*要想看到边框的颜色,就必须设置边框的样式,否则看不到效果。
        border也可以简写:border:1px solid Red  意思是设置边框border宽度为1px,样式为solid,颜色为Red*/
        .d1{  border-width:1px; border-style:solid;border-color:Red; background-color:Gray; text-align:center; }
    </style>
</head>
<body>
<div class="d1">div1测试</div>
<div>
border-left 设置左边框,一般单独设置左边框样式使用
border-right 设置右边框,一般单独设置右边框样式使用
border-top 设置上边框,一般单独设置上边框样式使用
border-bottom 设置下边框,一般单独设置下边框样式使用,有时可将下边框样式作为css下划线效果应用。

四边相同边框border简写

#divcss5{border:1px solid #00F}

设置了divcss5对象盒子1px像素蓝色实线边框
</div>

</body>
</html>

CSS border边框取值,布布扣,bubuko.com

时间: 2024-08-10 15:09:37

CSS border边框取值的相关文章

HTML+CSS笔记 CSS中级 颜色&长度值

颜色值 在网页中的颜色设置是非常重要,有字体颜色(color).背景颜色(background-color).边框颜色(border)等,设置颜色的方法也有很多种: 1.英文命令颜色 语法: p{color:red;} 2.RGB颜色 这个与 photoshop 中的 RGB 颜色是一致的,由 R(red).G(green).B(blue) 三种颜色的比例来配色 p{color:rgb(133,45,200);} 每一项的值可以是 0~255 之间的整数,也可以是 0%~100% 的百分数. 每

table border 和css border的区别

<table width="98px" height="50px" style=" border:solid 1px blue;" > <tr> <td colspan="2">1</td> </tr> <tr> <td>1</td> <td style="font-weight: 700">2<

CSS border边框属性教程(color style)

CSS 边框即CSS border-border边框样式颜色.边框样式.边框宽度的语法结构与应用案例教程篇 一.CSS 边框基础知识 CSS 边框即CSS border是控制对象的边框边线宽度.颜色.虚线.实线等样式CSS属性.同时大家可以进入码农教程提供CSS手册查看border手册:http://www.manongjc.com/cssref/pr_border.html 二.Html原始边框与DIV+CSS边框对照 Html表格控制边框:border="1" bordercolo

css border画图

css border属性竟然可以用来画图,今天项目中遇到该问题,借此有机会深入了解了下. css border属性在我的印象当中只是方方正正的东西,无非就是增加边框的宽度,变换边框的颜色,因此一直以为边框不管怎么变换都是一个长方体,这个念头今天终于可以抛弃了. 先看下普通边框效果: .border1{width:50px; height:50px; border:2px solid; border-color:#ff3300 #0000ff #339966 #00ff00;}<div class

CSS常用属性和值

下载高清图:css常用属性和值(思维导图总结) 1.字体 <html> <head> <title>font</title> <style> h1{ font-family:times,courter; font-size:150% font-style:italic; font-variant:normal; font-weight:normal; } h2{ font-family:serif,times; font-size:1cm; fo

CSS背景颜色属性值转换

<!DOCTYPE html> <html><head><meta charset="UTF-8"> <title>CSS背景颜色属性值转换</title> <style type="text/css"> .top_tips { position:relative; width:1000px; margin:20px auto; padding:10px; color:#272727

CSS Border(边框)

CSS Border(边框) 一.CSS 边框属性 CSS边框属性允许你指定一个元素边框的样式和颜色. 示例效果: 二.边框样式 边框样式属性指定要显示什么样的边界. border-style属性用来定义边框的样式. p.none {border-style:none;} /*无边框*/ p.dotted {border-style:dotted;} /*虚线边框*/ p.dashed {border-style:dashed;} /*虚线边框*/ p.solid {border-style:s

JavaScrip单选,下拉框,文本框取值赋值--【DRP】

代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Co

巧用css border

上下左右边框交界处呈现平滑的斜线.利用这个特点,通过设置不同的上下左右边框宽度或颜色,可以得到小三角.梯形等. 调整宽度大小可以调节三角形形状. 实现三角形 示例1: #test1{ height:20px; width:20px; border-color:#FF9600 #3366ff #12ad2a #f0ed7a; border-style:solid; border-width:20px; } 示例2: 在上面的基础上,把高度宽度都设为0时,会呈现边界斜线. #test2 { heig