常用css样式.doc
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 常用 css 样式
- 资源描述:
-
最完整通用的CSS公用样式 第二版本诞生 @charset "utf-8"; /* * 将具有默认margin和padding的标记置零 * @overlay * * @desc 所有标记的margin、padding都在使用时具体定义 */ *{margin:0;padding:0;} /* * 修正IE5.x和IE6的斜体溢出bug * @bugfix * @css-for IE 5.x/Win, IE6 */ * html body{ overflow: visible; } * html iframe, * html frame{ overflow: auto; } * html frameset{ overflow: hidden; } /* @group 常用标签 */ /* * 基本标签默认样式取消 * @overlay HTML标签 * @desc 取消基本标签默认样式,防止不同浏览器显示效果不同 * @Prop text-align:center; 解决不同浏览器剧中问题 */ body{color:#000;background:#fff;font:12px/22px Verdana,Arial,sans-serif,"Times New Roman",宋体;text-align:center;} body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div,tr{margin:0;padding:0;} input,select{font-size:12px;vertical-align:middle;} /* * 设置内容左对齐 * @overlay div * @desc 恢复因BODY设置剧中产生的继承 */ body div{text-align:left;} /* * 标签属性 * @overlay textarea,input * @desc 强制输入时内容超出时换行 */ textarea,input{ word-wrap:break-word;word-break:break-all;padding:0px;} /* * 清除ul列表标记的样式 * @overlay li * @desc ul列表更多的用在不需要列表前置符号的样式里 */ li{list-style-type:none;} /* * 定义图片边框 * @overlay img * @desc 当图片作为链接内容被填充时,会有默认边框出现,重定义掉 */ img{border:0 none;} /* * 定义默认的链接样式 * @overlay a * @desc 仅仅是作为默认样式提供,可以在各自的实例中覆盖掉 */ a:link, a:visited{ color:#000; text-decoration: none; } a:hover{ color:#F60; text-decoration: underline; } /* 去掉链接的虚线框 */ /* a {outline: none; a {star:expression(this.onFocus=this.blur()); */ /* * 定义H系列标签 * @overlay HN * @desc 覆盖H系列标签默认属性 */ h1{ font-size:24px;} h2{ font-size:20px;} h3{ font-size:18px;} h4{ font-size:16px;} h5{ font-size:14px;} h6{ font-size:12px;} /* @end */ /* @group 通用属性定义 */ /* 鼠标样式 */ .pointer{cursor:pointer;} /* 取消边框 */ .NoBorder{border:0 none;} /* 文本对齐方式 */ .t-l{text-align:left;} .t-c{text-align:center;} .t-r{text-align:right;} /* * 字母和单词换行设置 * @class Break 强制内容换行 * @class Nobreak 强制内容不换行 */ .Break{word-break:break-all;word-wrap:break-word;} .Nobreak{word-break:keep-all;word-wrap:normal;} /* 浮动定义 */ .FL{float:left;} .FR{float:right;} /* 定义文本下划线 */ .UnLine{text-decoration:underline;} .DisunLine{text-decoration:none;} /* 定位关系 */ .absolute{position:absolute;} .relative{position:relative;} /* 下划点虚线 */ /* .dotLine{ background:url(../image/dot01.gif) repeat-x left bottom;} */ /* ul列表 .ul-fl li{ float:left; height:23px; line-height:23px; padding-left:20px; } .ul-fl-d li{ float:left; height:23px; line-height:23px; background:url(../images/dot/dot3-3.jpg) no-repeat 8px 10px; padding-left:20px; } .ul-no-f li{ height:23px; width:100%; overflow:hidden; line-height:23px; background:url(../images/dot/dot3-3.jpg) no-repeat 8px 10px; padding-left:20px; } */ /* @end */ /* 通用容器 */ .wrapper{ clear: both; overflow: hidden; } /* @group 隐藏元素 */ /* * 隐藏元素 * @class o-hidden * @desc 当元素内容内容超出元素height 或 width 时,隐藏之 */ .o-hidden{overflow:hidden;} /* * 隐藏元素 * @class invisible * @desc visibility可以隐藏元素,但是还是会在布局中占位 */ .invisible{ visibility:hidden; } /* * 从页面布局上隐藏元素 * @class hidden * @desc 从布局上隐藏元素 */ .hidden{ display: none; } .block {display:block;} /* @end */ /* * 清理元素 * @class clear * @desc 清理浮动元素,当浮动换行时后面元素不希望浮动,添加此属性,防止IE BUG */ .clear{clear:both; height:0px; width:100%; font-size:1px; line-height:0px; visibility:hidden; overflow:hidden;} /* 常用样式定义 */ /* * 边框定义 * @Pro 由大写B开头,表示系统公用边框样式 * @desc 常用样式可更具一个项目的样式使用频率重新定义,扩展 */ .BTW{ border-top-width:1px;} .BRW{ border-right-width:1px;} .BLW{ border-left-width:1px;} .BBW{ border:0px; border-bottom-width:1px;} .Bord1{border:1px solid #999;} .Bord2{border:2px solid #999;} /* 边框宽度 (BW开头) */ .BW1{ border-width:1px;} .BW2{ border-width:2px;} .BW3{ border-width:3px;} .BW4{ border-width:4px;} .BW5{ border-width:5px;} /* 边框样式 (Bs开头) */ .BsS{ border-style:solid;} .BsD{ border-style:dotted;} /* 边框颜色 (Bc开头) */ .BcBlue{ border-color: #0000FF;} .BcBlack{ border-color: #000;} /* 下划线 */ .BotLine{ border-bottom:1px solid #CFCFCF; overflow:hidden;} /*.BotDotLine{ background: url(../image/dot01.gif) repeat-x left bottom;}*/ .BotDotLine01{ width:95%; margin:0 auto; background: url(../image/dot01.gif) repeat-x; height:1px; line-height:1px; overflow:hidden;} /*.BotDasLine{ border-bottom:1px dashed #CFCFCF; overflow:hidden; height:1px; line-height:1px;}*/ /*.border-r-dot{ background:url(../image/dot02.gif) repeat-y right top;}*/ /* * 宽度定义 * @Pro 由小写C开头,表示color * @desc 常用样式可更具一个项目的样式使用频率重新定义,扩展 */ .W1024,.W786,.W975,.W972{width:968px;margin:0 auto;} .W1024{width:1024px;} .W786{width:786px;} .W975{width:975px;} .W972{width:972px;} /* * 颜色功能定义 * @Pro 由小写C开头,表示color * @desc 常用样式可更具一个项目的样式使用频率重新定义,扩展 */ .cRed{color: #F00;} .cWhite{color: #FFF;} .cGreen{color:#0F0;} .cGray{color: #666;} .cBlue{ color: #00F;} .cblack{ color:#000;} /* 定义某个项目常用颜色 */ .c001{color:#663;} /* * 定义字体样式 * @Pro 由大写字母F开头,表示FONT * @desc 常用样式可更具一个项目的样式使用频率重新定义,扩展 */ /* 字体样式 */ .FB{font-weight:bold;} .FN{ font-weight:normal;} .FI{font-style:italic;} /* 字体大小 */ .F10{font-size:10px;} .F11{font-size:11px;} .F12{font-size:12px;} .F13{font-size:13px;} .F14{font-size:14px;} .F16{font-size:16px;} .F18{font-size:18px;} /* * 定义间距,上下2个DIV间距 * @Pro 使用DIVH开头. * @desc 上下DIV有间距时使用,尽量不使用margin/padding值,防止不同浏览器出现BUG, * 使用下面属性可兼容大多浏览器. */ .DivH5,.DivH10,.DivH15,.DivH20,.DivH25,.DivH30,DivH1,.DivH40{width:100%;overflow:hidden;} .DivH1{ height:1px;} .DivH5{height:5px;} .DivH10{height:10px;} .DivH15{height:15px;} .DivH20{height:20px;} .DivH25{height:25px;} .DivH30{height:30px;} .DivH40{height:40px;} /* * 定义行高 * @class LH * @desc 使用较少,主要定义line-height属性 */ .LH1{ line-height:1px; } .LH10{ line-height:10px; } .LH15{ line-height:15px; } .LH18{ line-height:18px; } .LH20{ line-height:20px; } .LH25{ line-height:25px;} .LH30{ line-height:30px;} .LH35{ line-height:35px;} /* * 标题样式定义 * @Pro PTit * @desc 在定义p标签元素或其它元素时,需要同时定义行高和高度,一般使用在标题显示中. */ .PTit25,.PTit20,.PTit18,.PTit30,.PTit,.PTit1,.PTit22{ width:100%; overflow:hidden;} .PTit30{line-height:30px;height:30px;} .PTit25{line-height:25px;height:25px;} .PTit22{line-height:22px;height:22px;} .PTit20{line-height:20px;height:20px;} .PTit18{line-height:18px;height:18px;} .PTit15{line-height:15px;height:15px;} .PTit10{line-height:10px;height:10px;} .PTit1{line-height:1px;height:1px;} /* * MORE更多样式设计 * @Pro MORE * @desc 显示在右侧更多/MORE样式,可根据需求扩展 */ .More{text-align:right;position:absolute; top:0; right:3px;} .MoreR5{ position:absolute; top:0px; right:3px; font:12px normal; } .MoreR15{ position:absolute; top:0px; right:15px; font:12px normal;} /* * 普通列表样式定义 * @desc 文章列表样 * @use 一般列表使用,ul li列表 */ .ArtList,.ArtList25,.ArtList22,.ArtList24{ width:100%; overflow:hidden; margin:0 auto;} .ArtList li{ width:100%; height:20px; line-height:20px; overflow:hidden;} .ArtList25 li{ width:100%; height:25px; line-height:25px; overflow:hidden;} .ArtList24 li{ width:100%; height:24px; line-height:24px; overflow:hidden;} .ArtList22 li{ width:100%; height:22px; line-height:22px; overflow:hidden;} /* @end */ /* 备注 */ /*在终极页面中调用该通用样式时,应该注意显示效果的不同,因为后台上传信息时编辑器里面样式并没有调用本默认样式表. * *所以在编辑器中标签会有默认的属性,用户在添加信息时,这些信息都是附带默认样式的. *如果用我们在终极页面也调用本默认CSS文件的话,许多标签如:p,td,li......标签默认样式都被取消,因此显示效不同. * *解决办法: * 在终极页面显示内容区域还原这些标签的默认属性. * */ /* ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div,tr{ margin:auto; padding:inherit;} input,select{ font-size:inherit;} img{border: inherit;} ul,li{margin:auto; padding:inherit;} li{ list-style-type:disc; } */展开阅读全文
咨信网温馨提示:1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。




常用css样式.doc



实名认证













自信AI助手
















微信客服
客服QQ
发送邮件
意见反馈



链接地址:https://www.zixin.com.cn/doc/6232755.html