PHPWind:详细解读7.0版本css样式

  建站学院(LieHuo.Net)讯 现在的网页制作已经基本上告别了table式,在w3c日益发展的今天,国内知名论坛phpwind更是将css运用的非常灵活,但是对于现阶段的草根站长来说,有很多朋友对css一知半解,甚至完全不懂。如何解决这一问题,现学肯定是来不及的。于是pw论坛将css样式的每句语法都进行了详细的描述,只要您懂中文,就能看会,建站学院的小编特别将此帖转载到这里,并增加了部分描述。

以下为引用的内容:
body{font-size:9pt; background:url($imgpath/$stylepath/bodybg.gif) repeat-x ; font-family:Verdana; color:#333} /*网页页面定义:依次定义了字体大小,背景,字体样式,字体颜色,如font-size代表文字大小*/

h1,h2,h3,h4,h5,h6,form,body{padding:0;margin:0}   /*设置部分标签的内填充和外边距 [ 没有重定义的必要 ]*/

td,th,div{word-break:break-all;word-wrap:break-word} /*设置td、th和div元素内的文本强行截断单词,此代码仅对ie有用。 [ 没有重定义的必要 ] */

img{border:0} /*默认图片边框初始化* border是边框的意思/ [ 没必要修改 ]  

h1{font-size:16px;margin:0;} /* 文章浏览页里得标题样式 */ [ 没必要修改 ]  

h3,h2{display:inline;font-size:1.0em;}
h3{font-weight:normal}
h3 a{color:#444;margin-right:.5em;}
/*h3 文章列表页文章标题*/

h2 a{color:#000;}   /*h2 板块列表页板块名称标题*/

.c{clear:both;height:0px;font:0px/0px Arial;} /* 清除浮动样式 [ 没必要修改 ] */

.b{ font-weight:700} /* 字体加粗 [ 没必要修改 ] */

.w{white-space:nowrap} /* 强制在同一行内显示所有文本  [ 没必要修改 ]  */

.tal{text-align:left} /*文本左对齐*/[ 没必要修改 ]  

.tac{text-align:center} /*文本中对齐*/ [ 没必要修改 ]  

.tar{text-align:right} /*文本右对齐*/ [ 没必要修改 ]  

.fr{float:right} /*往左边浮动*/ [ 没必要修改 ]  

.fl{float:left} /*往右边浮动*/ [ 没必要修改 ]  

/*a link 基本连接颜色*/
a{text-decoration:none;color:$linkcolor}  链接样式[鼠标未移动上去,显示的样式]

a:hover{color:#0070AF; text-decoration:underline}  /*鼠标移动上去显示的样式*/

/*字体大小*/ [ 没必要修改 ]  
.f9{font-size:10px;}
.f10{font-size:11px;}
.f12{font-size:12px}
.f14{font-size:14px}

.fn,.fn a{font-weight:normal} /*去除粗体字*/ [ 没必要修改 ]  

/*span color 数值自定义*/
.s0{color:#333}
.s1{color:#008000;} /*绿色*/
.s2{color:#984B98;} /* 紫色 */
.s3{color:#FA891B;} /*橙色*/
.s4{color:#0033FF;} /* 蓝色 */
.s5{color:#659B28} /* 绿浅色 */
.s7{color:#ff00a2;} /*粉色*/
.s8,.s8 a{color:#006699;} /*深蓝*/
.gray,.gray a{color:#888;} /*次要文字颜色-可定义*/
.gray3{color:#777;}
.gray2{color:#94938c;}
.link5{ color:#006AAA} /*深蓝*/

/*main color 数值自定义*/
.f_one   /*首页版块里的第一颜色*/

.f_two  /*首页版块里鼠标移动到上面所显示的颜色*/

.t_one  /* 主题列表版块里的第一颜色*/

.t_two /* 主题列表版块里鼠标移动到上面所显示的颜色*/

.r_one /* 主题浏览里的主题内容背景*/

.r_two /* 主题浏览里用户信息的背景*/

以上可以分开设置

.f_one{background:$forumcolorone;}
.t_one{background:$forumcolorone;}
.r_one{background:$forumcolorone;}

也可以默认设置
.f_one,.t_one,.r_one{background:$forumcolorone;}

/*按钮*/
.abtn{cursor:pointer;border:1px solid $tdcolor;color:$linkcolor;padding:2px 8px 2px; font-family:simsun;background:#fff;margin:2px;}
.abtn:hover{border:1px solid $tablecolor;text-decoration:none;}
/*连接文字按钮*/

.btn{cursor:pointer;color:#fff;background:#80d1fb url($imgpath/$stylepath/bg.png) 0 top repeat-x;border-width:1px;padding-left:15px;padding-right:15px;vertical-align:middle}
/* 全局通用按钮设置 */

.btn2{border: 1px solid $tdcolor;background:$forumcolortwo;border-width:1px;padding-left:5px;padding-right:5px;vertical-align:middle;color:#555;}
.btn2:hover{border:1px solid $tablecolor;color:#0070AF;}
.btn3{margin-left:2em;vertical-align:middle;cursor:pointer;text-decoration:underline;}
/*其他类型按钮*/

/*form*/
textarea,input,select{font:12px Arial;padding:1px 3px 0 3px;vertical-align:middle;margin-bottom:1px}
/* 输入框,标题填写,下拉框 综合样式 [可以一起设置,也可以分开在下面的几个表里设置] */

select{border:solid 1px $tdcolor;} /* 下拉框具体设置*/ [ 没必要修改 ]  

.input{border: 1px solid; border-color: #c0c0c0 #ededed #ededed #c0c0c0;padding:2px 0px 2px 1px;font-size:1.0em;vertical-align:middle;color:#000;}
/* 标题填写输入框 */

form{display:inline;} /*无修改必要*/

textarea{border: 1px solid; border-color: #c0c0c0 #ededed #ededed #c0c0c0;} /* 大型文本输入框样式 */

/*header*/
#header{width:$mtablewidth;margin:auto;} /*头部宽度样式  [后台风格编辑里的  头部和尾部表格宽度设置之一] */

/*自定义导航*/
#toptool{ padding:.5em 1em; text-align:right; line-height:100%;border-bottom:1px solid #eee;}
.listinline{ padding:0; margin:0; list-style:none;}
.listinline li{ padding:0 .7em; border-right:1px solid #eee; display:inline;}
/*头部导航样式*/

/*banner*/
.banner img{vertical-align:middle;} /*图片居中显示[无修改必要]*/

/*top-logo下导航背景*/
#mainNav{background:url($imgpath/$stylepath/bg.png) 0 -300px repeat-x #0082C1;position:relative;_height:30px}
/* 重要栏目导航 [如 社区服务等] */

/*guide*/
.guide { margin:0; list-style:none; padding:5px 1em 0; float:right}
.guide li{ float: left; margin:0; padding:0}
.guide li a{ float:left; padding:0 .6em; color:#fff; line-height:22px;*line-height:23px; height:25px;*word-wrap:normal;*white-space:nowrap}
.guide li.drop-item a{ padding-right:1.2em; background:url($imgpath/$stylepath/drop-icon.gif) no-repeat right .7em}
.guide li a:hover{ background-color:#4598C6; text-decoration:none; color:#fff}
.guide li.current a{ background-color:#006AAA; font-weight:bold; border:1px solid #4598C6; border-bottom:0}
/* 重要栏目导航连接样式 [如 社区服务等] */

/*top信息开关*/
#one-key {position:absolute;left:.6em; bottom:-1px; _bottom:-2px;width:32px; height:20px; cursor:pointer}
.one-hidden {background:url($imgpath/$stylepath/infobox_13.png) 0 top no-repeat; }
.one-show {background:url($imgpath/$stylepath/infobox_13.png) 0 bottom no-repeat;}
/**头部个人信息开关/

/*top用户名*/
#user-login{ padding-left:50px; color:#fff; padding-bottom:.2em}
#user-login a{margin-right:.5em;}
/*头部个人信息开关右边的用户名 与设置 的样式*/

/*index info*/
#profile-menubar{border:$tdcolor 1px solid;margin-top:-.6em;background:url($imgpath/$stylepath/bg.png) 0 -400px repeat-x #E1F6F9;}
#infobox{ border:1px solid #eee; border-top:0; padding:.2em .5em .5em;margin-top:1px; background:#fff url($imgpath/$stylepath/bg.png) 0 -400px  repeat-x;}
#infobox td{ vertical-align:top}
/* 首页登陆框的样式 [包含公告栏] */

/*收藏板块*/
#fav-fid{ line-height:150%}
#fav-fid ul{ padding:0; margin:0 0 0 75px; color:#aaa;}
#fav-fid li{float:left;*word-wrap:normal;*white-space:nowrap;padding:0; margin:0; padding-left:1em;list-style:none;background:url($imgpath/$stylepath/fav-fid.gif) .2em .5em no-repeat;}

/*头部签名*/
#honor {color:#333;line-height:1.3em; padding:.2em 0 0 .1em;}

/*通用公告框*/
#breadcrumbs{ margin-top:8px;overflow:hidden;border:1px solid $tdcolor; height:28px; padding:0 1em 0 0;background:url($imgpath/$stylepath/menubg.gif) repeat-x #EFFCFE;
line-height:27px;*line-height:26px;}
#breadcrumbs .crumbs-item{ overflow:hidden; height:28px; padding:0 1.3em 0 1.3em;background:url($imgpath/$stylepath/breadcrumbs-item.gif) right top no-repeat; float:left; position:relative ; margin-right:-7px;}
#breadcrumbs .crumbs-item .strong{color:#60afe6;*line-height:29px;_line-height:29px;}
#breadcrumbs .crumbs-item  i { position:absolute; height:28px; width:7px; left:0px; top:0}
#breadcrumbs .crumbs-item:hover i{ background:url($imgpath/$stylepath/breadcrumbs-item.gif) right bottom no-repeat;}
#breadcrumbs .crumbs-item:hover{ background-color: #EFF9C8;text-decoration:none}
#notice{padding:.3em 0;height:18px;}
#notice a{padding-left:1em; background:url($imgpath/$stylepath/dotB.png) no-repeat 0 .2em; margin-left:1em}

/*main*/
#main{width:$tablewidth;margin: auto; padding:1px 0 0}  /* 中间得整体框架样式 */

/*table*/
.t{border:1px solid $tablecolor;border-top:2px solid $tablecolor;margin:0 auto 8px; height:auto; overflow:hidden;}
/* 风格里所有的框架边框样式 [后台风格编辑里的  表格外边框颜色 ] */

.t table{border:0px solid $forumcolorone;margin:0; width:100%;border-top:none;}
/* 样式.t里的table框架样式 */

.t2{border-top:$tablecolor 1px solid;margin:0px auto 5px;}
/* 浏览页里的框架 [ 无修改必要 ] */

.t3{margin:4px auto 3px;}
.t3 table{padding:0px;}
/* [ 无修改必要 ]  */

.t4{padding:0px;} /* [ 无修改必要 ]  */

.t5{border:1px solid $tdcolor;margin:0 auto 8px; height:auto; overflow:hidden;}
/*浅边框样式*/

/*table head*/
.h{border-bottom:1px solid $headborder;background:$headcolor;text-align:left;color:$headfontone;padding:2px .5em 0; line-height:220%;}
.h span{font-weight:normal;}
.h h2{font-weight:bold}
.h a{font-family:Arial;color:$headfontone}
.h span a,.h span{color:$headfonttwo;}
.h a.a2{margin-left:12px;}
/*标题栏样式*/

.h1{color:#008ef1;margin:0 0 1em 0;} /*文章浏览页标题补充样式*/

.h2{background:$headcolor;color:$headfontone;text-align:left;padding:0 12px 0 12px;height:28px;line-height:28px;border-bottom:1px solid $tdcolor;}
.h2 a{color:$headfontone;}
/*文章浏览页标题栏*/

.h3{border-bottom:1px solid $headborder;background:$headcolor;text-align:left;color:$headfontone;line-height:24px;padding-right:8px;}
.h3 a{font-family:Arial;color:$headfontone}

.closeicon{margin-top:.3em} /*无修改必要*/

.cate_fold{padding:0 5px 0 5px;margin-bottom:2px;text-decoration:none;}
.cate_fold:hover{text-decoration:none;}
/*无修改必要*/

/* tab */
.tab{float:left;padding:0 .8em 0;border:1px solid $forumcolorone;background:$headborder;border-bottom:0;line-height:200%;margin-top:3px;cursor:pointer;margin:2px 0;}
.h span.activetab{border-color:$tablecolor;cursor:default;font-weight:700}
/*table tr1*/
.tr1 th{padding:5px 10px;text-align:left;vertical-align:top;font-weight:normal;}
.tr1 td.td1{border-bottom:1px solid $tdcolor;}
/* 列表页里左右框架样式[如无必要不用修改] */

/*table tr2*/
.tr2{background:$cbgcolor url($imgpath/$stylepath/bg.png) 0 -200px repeat-x;color:$cbgfont;}
.tr2 td,.tr2 th{line-height:18px;border-bottom:1px solid $cbgborder;padding:4px 6px 1px;}
.tr2 a{color:$cbgfont;margin:0 2px 0}
/* 表格副标题栏 可修改背景 框大小 [如 首页 主题 文章 最后发表 版主] */

/*table tr3*/
.tr3{ line-height:130%;}
.tr3 td,.tr3 th{border-bottom:1px solid $tdcolor;padding:.3em .6em;}
.tr3 th{text-align:left;font-weight:normal;}
.z .tr3:hover{background:$forumcolortwo;}
/* 全局td样式,如首页板块的下边框 */

.tr4{background:$forumcolortwo;padding-left:12px;height:27px;line-height:27px;} /* 备用css[ 无修改必要 ] */

.tr td,.tr th{padding:2px} /*[ 无修改必要 ] */

/*topic content tips*/
.tpc_content{font-family:Arial;padding:0 2% 0 2%;margin:0 0 2%;line-height:2em;}
.tpc_content font{line-height:1.1em;}
.tpc_content a{text-decoration:none;color:#0070AF;}
.tpc_content a:hover{text-decoration:underline}
/*浏览页内容样式表*/

.tips{background:#fff;border:$cbgborder 1px solid;padding:5px;margin:0 1% 1em 0;float:left;text-align:left;}
/* 本帖最近评分记录等样式 */

.tiptop{border-bottom:1px dotted #ccc ;padding:0 0 0 1px;height:27px;line-height:27px;margin:0 1em 1em 1em;}
/*楼主,发帖时间所在的那个位置样式*/

.tipad{margin:2em 1em 0 1em;padding-bottom:1em;}
.tipad .fr a{color:#333;}
/* 浏览页里 评分,禁言,屏蔽,提醒等 样式控制 */

.quote{width:80%;font-size:70%;color:#333;margin:8px 2px 2px;padding:0}
.blockquote{width:80%;border:1px solid #ece9d8;background:#fffef3;border-left-width:3px;padding:5px;margin:0 0 1%;color:#736933;}
/*应用提醒等样式*/

.honor{line-height:130%;padding:3px 0 5px 8px;overflow:hidden;color:#777;} /*浏览页里个性签名样式控制*/

/*menu*/
.menu{position:absolute;background:#fff url($imgpath/$stylepath/menubg.gif) center top repeat-x;border:1px solid $tdcolor;}
.menu .bor{padding-bottom:8px;*padding-bottom:0px;_padding-bottom:0px;border:5px solid $tdcolor;}
.menu li,.menu ul{padding:0; margin:0;}
.menu td{line-height:20px;}
.menu li{list-style:none;}
.menu a{display:block;padding:3px 15px;}
.menu ul.ul1 li a{display:inline;padding:0;}
.pad{padding-bottom:8px;*padding-bottom:0px;}
/*下拉或ajax弹出通用样式*/

.menu .ul2{width:170px;padding:8px;}
.menu .ul2 li{float: left; width: 7em;line-height: 24px;height: 24px; overflow: hidden;border-bottom: 1px solid $tdcolor;}
.menu .ul2 li:hover{border-bottom: 1px solid $tablecolor;}
.menu .ul2 li a:hover{text-decoration:none;background:$forumcolorone;}
/*风格切换等下拉菜单*/

.menu h2 a{font-size:1.0em;color:#008ef1;height:20px;line-height:20px;width:550px;}
.menu .ul3{width:600px;padding:6px;clear:both;}
.menu .ul3 li{float:left;line-height:20px;*word-wrap:normal;*white-space:nowrap;display:inline;}
.menu .ul3 a{float:left;}
.menu .ul3 li a:hover{color:$tablecolor;}
/*板块菜单下拉菜单*/


/*pages*/
.pages{float:left;border:1px solid $tdcolor;height:24px;line-height:24px;margin:2px 5px 3px 0;}
.pages ul{padding:0; margin:0}
.pages ul li{list-style:none;float:left;}
.pages ul li a{display:block;padding:0 7px 0 7px;}
.pages ul li b{padding:0 5px 0 9px;background:#f7fadd;display:block;color:#FA891B;}
.pages ul li a:hover{background:#f7fadd;color:#FA891B;text-decoration:none;}
.pages ul .pagesone{height:24px;_height:23px;margin-left:5px;border-left:1px solid $tdcolor;padding-left:12px;background:#fefff3;}
.pages input{border:1px solid $tdcolor;font:12px/15px Verdana;height:14px;color:$cbgfont;margin-right:5px;margin-bottom:3px;*margin-bottom:2px;_margin-top:3px;}
/*分页代码*/

/*footer*/
#footer{background:#fff url($imgpath/$stylepath/menubg.gif) 0 1px repeat-x;border-top:1px solid $tdcolor;border-bottom:3px solid $headborder;}
.footer{width:$mtablewidth;text-align:right;margin:auto;padding:.8em 0 .3em;}
/*底部信息样式*/

/*wind7 begin*/
#wrapA{ width:100%; margin:auto; max-width:1250px}
/*中间框补充样式*/

.cc{ zoom:1; overflow:hidden;_overflow:inherit} [ 没必要修改 ]  

/*通用下拉*/
.content-dropB{margin-top:2px;}
.dropB{cursor:pointer;text-indent:-2000em;background:url($imgpath/$stylepath/dropB-cion.gif) 0 0 no-repeat;width:15px;height:12px; overflow:hidden; ;font:0/0 a;float:left}
.dropB:hover{background-color:$tablecolor; background-position:0 -20px;}
/*如 头部,我的回复旁边的那个加号下拉*/

.listmg{ padding:0; margin:0; list-style:none;}
.listmg li{ padding:0 .7em; border-right:1px solid #eee;cursor:pointer;}
.bdbdash{border-bottom:1px dashed #ccc}

  如果还有不明白的,请您在评论中留言,我们会在最短的时间内回复给您。

相关文章

**本资源可免费获取,请至尾部读阅!**Discuz素材资源交易论...
分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风...
最近工作需要IIS,自己的电脑又是Windows7系统,找了下安装的...
首先就是discuz,用起来真的是特别的好用,搭建的网站真的非...
1.找到图片路径拼装文件首先打开根目录下的template目录找到...
打开NavicatforMySQL找到数据表 pre_ucenter_members 把密...