2023年6月20日发(作者:)

htmldiv代码⼤全,DIV+CSS常⽤代码⼤全* html .classdao {} 6.0*+html .classdao {} 7.0DISPLAY: block;块状元素注释代码⾥⾯放中⽂会引起多出⾏或着很多不确认因素 ⽂字溢出和浮动错位等style="cursor:hand" ⼿型显⽰加下划线清除浮动:clear:bothIE6.0下margin-left双倍距 解决⽅法:加⼊:display: inline;.class_r_x li:hover,.class_r_x {background: #FFE8E8;} ⿏标经过变⾊⽂本字段:input{}[PS:全局定义]本站声明 直接给⽂字加阴影“DISABLED”-------------------------------------------------------------------FILTER: progid:nt(GradientType=0, StartColorStr=#ff0000,EndColorStr=#ffffff); 加在css⾥⾯ 实现渐变的效果-------------------------------------------------------------------display:none;隐藏DIV-------------------------------------------------------------------.main{width:950px;MARGIN: 0px auto;}段落缩进:text-indent: a:active {test:expression(target="_blank");}定义整站所有的链接都新窗⼝打开layout-flow: vertical-ideographic;字体竖排⽕狐下取消前⾯的点:list-style:none您的⼿机号码:none : 默认值 SPAN:对象 指定内嵌⽂本容器border="0"图边框位0 border:0;.hangleftcenfootdi02 li{float:left;padding:0 7px;font:normal 100% Tahoma,sans-serif;border-right:1px solid #333333;}/*导航样式*/display=block,block表⽰该元素显⽰为⼀个块级元素,单独占⼀⾏none表⽰该元素不显⽰,并且不在⽹页上占位white-space: nowrap 属性实现禁⽌⽂字⾃动换⾏font-weight:700 字体的粗细 font-family:Georgia; 好看的数字字体color:#0000FF 字体的颜⾊font-size:12px 字体的⼤⼩font-family: ⾦梅⽑⾏書; 限制字体line-height:180% ⾏间的⾼度position:absolute; bottom:0; DIV居底部font-family:"宋体" 字体的选择color:#FF0000 颜⾊的控制letter-spacing:2px 字间距的控制border: 1px solid #FF0000 边线 1px是宽度;solid是形态,这⾥表⽰实线,再如dotted和dashed是虚线;#000是颜⾊。(border-bottom:1px solid #D3D3D3; border-left:1px solid #D3D3D3; border-right:1px solid #D3D3D3; 它可以分别对边线进⾏定义,四个⽅向)text-decoration: none; 下滑线BORDER-BOTTOM: #ddd 1px dashed; 点阵虚线[⼤]点阵虚线[⼩]text-align 对齐元素中的⽂本(4个⽅向) text-align:center; 垂直排列-底部vertical-align:bottom;background-color: #999999; 背景⾊background-image: url(/images/); 背景图background:url(../../img/esyj_/) no-repeat 4px 3px;background:url(../images/top_) top center no-repeat; 底图居顶BACKGROUND: url(/img/body_) repeat-y center 50%; 解决背景拉伸与上下延伸的问题BACKGROUND: url(../img/) #fff repeat-x 0px 0px 背景居顶横铺 其余的地⽅为⽩⾊background-repeat:no-repeat; 背景禁⽌拉伸FLOAT: center; 框⾥平⾏居中(4个⽅向)margin-top: 100px; 间距 整体边距(4个⽅向)padding-top:??px来设置对象的内下边距的样式 对应的有left(左边) right(右边) bottom(底部) top(顶部) 定义全局边距:padding:10px;display:inline 可⽤来⽔平排列对象 去掉li前⾯的点:list-style:none;OVERFLOW: hidden;内容会被修剪,但是浏览器不会显⽰供查看内容的滚动条。absolute是绝对定位,relative是相对定位 写法“position:absolute;margin:(外边距)(包含四个⽅向)padding:(内边距)(包含四个⽅向)⽂字对齐我绝对中间!a:link {color: #F00;text-decoration: none;} 链接颜⾊a:visited {text-decoration: none;} 已访问链接a:hover {text-decoration: none;color: #00F;} 变换图象链接a:active {text-decoration: none;} 活动链接 ⼀般情况下不要这栏text-decoration: underline; 下划线上下居中:line-height:25px;#main_08_info_08_txt LI _01给LI⾥⾯重新定义样式 我们习惯⽤ID来定义 如果⽤CLASS的话 会读不到样式图⽚样式.yjcs_biao_images li{ width:128px; height:100px; float:left;margin:0 0 20px 14px; text-align:center;}.yjcs_biao_images img{ width:120px; height:80px;border: 1px solid #BDD5ED; padding:3px 3px 3px 3px; float:left; margin:00 10px 0}⿏标移上去以后变成⼿的形状 style="cursor:hand"浮动 .news_x_l_top_01_tu .hover_bg_txt { margin-left:-180px;PADDING-BOTTOM: 0px; WIDTH: 180px; LINE-HEIGHT: 15px;PADDING-TOP: 0px; POSITION: absolute; TOP: 440px; HEIGHT: 15px; text-align:center; color: Blue; background-color:#E6E6E6}[PS:TOP为整站的定位;margin-top:10px;相对定位]关闭如何让图⽚和⽂字在同⼀条⽔平容器中居中对齐 可以⽤有个很简单的解决办法 就是在图⽚上加个样式vertical-align:middle;放在图⽚的代码⾥/*给图⽚加链接⾊*/#qita_qg li A IMG {BORDER-RIGHT: #ddd 1px solid; BORDER-TOP: #ddd 1px solid; BORDER-LEFT: #ddd 1px solid;BORDER-BOTTOM: #ddd 1px solid}#qita_qg li A:visited IMG {BORDER-RIGHT: #ddd 1px solid; BORDER-TOP: #ddd 1px solid; BORDER-LEFT: #ddd 1px solid;BORDER-BOTTOM: #ddd 1px solid}#qita_qg li A:hover IMG {BORDER-RIGHT: #eb0156 1px solid; BORDER-TOP: #eb0156 1px solid; BORDER-LEFT: #eb01561px solid; BORDER-BOTTOM: #eb0156 1px solid}------------------------------------------⽹站共⽤----------------------------------------------------------* {PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP:0px}body,div,img,ul,li,span,p,br { margin:0; padding:0;border:0;}body { font-size:12px; color:#666;margin:0 auto 0 auto; width:950px;}li { list-style:none;display: inline;}a { font-size:12px; color:#666; text-decoration:none;}a:hover { text-decoration:underline; color:#F60;}img{ border:none;vertical-align:middle;}h1{font-size:12px; font-weight:bold; color:#000000; float:left}h2{font-size:14px; font-weight:bold; color:#000000; float:left}PNG透明的⽅法:

2023年6月20日发(作者:)

htmldiv代码⼤全,DIV+CSS常⽤代码⼤全* html .classdao {} 6.0*+html .classdao {} 7.0DISPLAY: block;块状元素注释代码⾥⾯放中⽂会引起多出⾏或着很多不确认因素 ⽂字溢出和浮动错位等style="cursor:hand" ⼿型显⽰加下划线清除浮动:clear:bothIE6.0下margin-left双倍距 解决⽅法:加⼊:display: inline;.class_r_x li:hover,.class_r_x {background: #FFE8E8;} ⿏标经过变⾊⽂本字段:input{}[PS:全局定义]本站声明 直接给⽂字加阴影“DISABLED”-------------------------------------------------------------------FILTER: progid:nt(GradientType=0, StartColorStr=#ff0000,EndColorStr=#ffffff); 加在css⾥⾯ 实现渐变的效果-------------------------------------------------------------------display:none;隐藏DIV-------------------------------------------------------------------.main{width:950px;MARGIN: 0px auto;}段落缩进:text-indent: a:active {test:expression(target="_blank");}定义整站所有的链接都新窗⼝打开layout-flow: vertical-ideographic;字体竖排⽕狐下取消前⾯的点:list-style:none您的⼿机号码:none : 默认值 SPAN:对象 指定内嵌⽂本容器border="0"图边框位0 border:0;.hangleftcenfootdi02 li{float:left;padding:0 7px;font:normal 100% Tahoma,sans-serif;border-right:1px solid #333333;}/*导航样式*/display=block,block表⽰该元素显⽰为⼀个块级元素,单独占⼀⾏none表⽰该元素不显⽰,并且不在⽹页上占位white-space: nowrap 属性实现禁⽌⽂字⾃动换⾏font-weight:700 字体的粗细 font-family:Georgia; 好看的数字字体color:#0000FF 字体的颜⾊font-size:12px 字体的⼤⼩font-family: ⾦梅⽑⾏書; 限制字体line-height:180% ⾏间的⾼度position:absolute; bottom:0; DIV居底部font-family:"宋体" 字体的选择color:#FF0000 颜⾊的控制letter-spacing:2px 字间距的控制border: 1px solid #FF0000 边线 1px是宽度;solid是形态,这⾥表⽰实线,再如dotted和dashed是虚线;#000是颜⾊。(border-bottom:1px solid #D3D3D3; border-left:1px solid #D3D3D3; border-right:1px solid #D3D3D3; 它可以分别对边线进⾏定义,四个⽅向)text-decoration: none; 下滑线BORDER-BOTTOM: #ddd 1px dashed; 点阵虚线[⼤]点阵虚线[⼩]text-align 对齐元素中的⽂本(4个⽅向) text-align:center; 垂直排列-底部vertical-align:bottom;background-color: #999999; 背景⾊background-image: url(/images/); 背景图background:url(../../img/esyj_/) no-repeat 4px 3px;background:url(../images/top_) top center no-repeat; 底图居顶BACKGROUND: url(/img/body_) repeat-y center 50%; 解决背景拉伸与上下延伸的问题BACKGROUND: url(../img/) #fff repeat-x 0px 0px 背景居顶横铺 其余的地⽅为⽩⾊background-repeat:no-repeat; 背景禁⽌拉伸FLOAT: center; 框⾥平⾏居中(4个⽅向)margin-top: 100px; 间距 整体边距(4个⽅向)padding-top:??px来设置对象的内下边距的样式 对应的有left(左边) right(右边) bottom(底部) top(顶部) 定义全局边距:padding:10px;display:inline 可⽤来⽔平排列对象 去掉li前⾯的点:list-style:none;OVERFLOW: hidden;内容会被修剪,但是浏览器不会显⽰供查看内容的滚动条。absolute是绝对定位,relative是相对定位 写法“position:absolute;margin:(外边距)(包含四个⽅向)padding:(内边距)(包含四个⽅向)⽂字对齐我绝对中间!a:link {color: #F00;text-decoration: none;} 链接颜⾊a:visited {text-decoration: none;} 已访问链接a:hover {text-decoration: none;color: #00F;} 变换图象链接a:active {text-decoration: none;} 活动链接 ⼀般情况下不要这栏text-decoration: underline; 下划线上下居中:line-height:25px;#main_08_info_08_txt LI _01给LI⾥⾯重新定义样式 我们习惯⽤ID来定义 如果⽤CLASS的话 会读不到样式图⽚样式.yjcs_biao_images li{ width:128px; height:100px; float:left;margin:0 0 20px 14px; text-align:center;}.yjcs_biao_images img{ width:120px; height:80px;border: 1px solid #BDD5ED; padding:3px 3px 3px 3px; float:left; margin:00 10px 0}⿏标移上去以后变成⼿的形状 style="cursor:hand"浮动 .news_x_l_top_01_tu .hover_bg_txt { margin-left:-180px;PADDING-BOTTOM: 0px; WIDTH: 180px; LINE-HEIGHT: 15px;PADDING-TOP: 0px; POSITION: absolute; TOP: 440px; HEIGHT: 15px; text-align:center; color: Blue; background-color:#E6E6E6}[PS:TOP为整站的定位;margin-top:10px;相对定位]关闭如何让图⽚和⽂字在同⼀条⽔平容器中居中对齐 可以⽤有个很简单的解决办法 就是在图⽚上加个样式vertical-align:middle;放在图⽚的代码⾥/*给图⽚加链接⾊*/#qita_qg li A IMG {BORDER-RIGHT: #ddd 1px solid; BORDER-TOP: #ddd 1px solid; BORDER-LEFT: #ddd 1px solid;BORDER-BOTTOM: #ddd 1px solid}#qita_qg li A:visited IMG {BORDER-RIGHT: #ddd 1px solid; BORDER-TOP: #ddd 1px solid; BORDER-LEFT: #ddd 1px solid;BORDER-BOTTOM: #ddd 1px solid}#qita_qg li A:hover IMG {BORDER-RIGHT: #eb0156 1px solid; BORDER-TOP: #eb0156 1px solid; BORDER-LEFT: #eb01561px solid; BORDER-BOTTOM: #eb0156 1px solid}------------------------------------------⽹站共⽤----------------------------------------------------------* {PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP:0px}body,div,img,ul,li,span,p,br { margin:0; padding:0;border:0;}body { font-size:12px; color:#666;margin:0 auto 0 auto; width:950px;}li { list-style:none;display: inline;}a { font-size:12px; color:#666; text-decoration:none;}a:hover { text-decoration:underline; color:#F60;}img{ border:none;vertical-align:middle;}h1{font-size:12px; font-weight:bold; color:#000000; float:left}h2{font-size:14px; font-weight:bold; color:#000000; float:left}PNG透明的⽅法: