RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
css样式mark,css样式margin的默认值

笑来老师公众号文章排版样式css关键内容详解

之前的文章介绍了[Markdown格式写作的优秀软件Ulysses],在定义排版样式时需要用到css文件,我自己参考了笑来老师公众号排版的css文件。

10年的平凉网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都全网营销的优势是能够根据用户设备显示端的尺寸不同,自动调整平凉建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“平凉网站设计”,“平凉网站推广”以来,每个客户项目都认真落实执行。

但对于不懂编程、不会代码的同学,依然不容易看懂里面的代码块究竟是什么含义。这篇文章会针对笑来老师的css文件内容中最重要的几个特征定义,逐行分析含义,另外,给出一些常用的css代码含义。

Css文件中的代码, {} 内的部分是定义规则, {} 外的部分是定义的规则所要施加的对象范围,所以,以上代码的含义是:

含义是:

含义是:

含义是:

含义:

含义是:

含义是:

含义:

含义:

含义:

含义:

以上为笑来老师所用css中的主要内容,也是常用样式css的主要内容,其中关于表格的部分没有写出来,是觉得通常公众号文章最重要的是几个级别的标题、强调、引用、分隔线这几部分。

定义css文件时,一定注意标点符号的格式,用英文格式。

每一级标题中都可以自定义其大小、颜色、位置、行距等等。

用Markdown格式书写文档时,每一段结束时要空一行,这样在公众号编辑器中最终呈现效果 才有段间距。

从Ulysses或其他编辑器中复制Markdown文档到公众号编辑器时,在粘贴之后,尽量先完成全部的后续编辑之后再渲染,后续编辑包括插图、定义超链接等等。

因为根据自己的体验,渲染过两次之后,字体会变成公众号编辑器默认的字号大小16px,以后的渲染,字体大小会失效。如果不是用这个字体的朋友,要注意下。

网奇的css样式文件在哪里

/* ========== 全局CSS定义 ====== */

body { text-align: center; font-family:"宋体", arial; margin:0; padding:0; background: #FFF; font-size:12px; color:#000;}

div,form,img,ul,ol,li,dl,dt,dd,p { margin: 0; padding: 0; border: 0;font-size:12px;}

li{ list-style:none;}

h1,h2,h3,h4,h5,h6,input { margin:0; padding:0;}

table,td,tr,th{ font-size:12px;}

ul.nl { list-style:none outside none; margin:0px; padding:0px}

ul.nl li { height:17px;padding-top:5px;padding-left:15px; background:url("style/index/bullet.gif") no-repeat 0px ;background-position:left 7px;}

ul li.fixed { height:17px;padding-left:15px; background:url("style/index/top.gif") no-repeat 0px ;background-position:left 0px;}

a.highlight:link, a.highlight:visited { color:red; text-decoration:none }

a.highlight:hover { color:red; text-decoration:underline }

#firstHeadline { padding:5px; border:1px solid #D6D6D6; background:url(style/index/topnews_bg.gif)}

#firstHeadline a.title:link, #firstHeadline a.title:visited { color:#3C4E52; font-size:14px; font-weight:bold; line-height:150%}

table.thumbnail {border:#F7F7F7 0px solid; word-break:break all; word-wrap:word-break;}

table.thumbnail td {padding:2px; background:#ffffff; border:#B2B2B2 1px solid;}

table.thumbnail td img {border:#999999 1px solid;}

#middle {width:900px; background-image:url(style/index/body_bg.gif);margin: 0 auto;overflow:hidden; text-align:center; }

.left { float:left;}

.gray { color:gray; text-decoration:none;}

.top_bg { height:33px; clear: both;background-image:url(style/wangqi/top_bg.gif); width:1004px;color: #FFF;}

.top_bg a:link, .top_bg a:visited {color: #FFF; text-decoration:none}

.top_bg a:hover {color: #FFF; text-decoration:none }

.loginbg { width:65px; height:14px;background-image:url(style/index/login_bg.gif); border:0}

/* ========== 链接颜色 ====== */

a:link { color: #000; text-decoration:none;}

a:visited { color: #000;text-decoration:none;}

a:hover { color: #f60; text-decoration:underline;}

a:active { color: #000;}

/* ========== 顶部flash ====== */

.topflashl {width:328px; padding-top:12px;}

.topflashm {width:230px; text-align:center;}

.topflashr {padding-top:12px;}

/* ========== 一级分类 ========== */

#navbar {width:900px;overflow:hidden;margin: 0 auto;}

#navbar .tm { height:42px; width:872px; background:url("style/index/navbar.gif"); text-align:center;}

#navbar .tl { height:42px; width:14px; background:url("style/index/navbar_l.gif");}

#navbar .tr { height:42px; width:14px; background:url("style/index/navbar_r.gif");}

#navbar a:link, #navbar a:visited {color: #FDFFFC; text-decoration:none}

#navbar a:hover {color: #FFF; text-decoration:none }

/* ========== 通栏广告位属性 ====== */

.ad888{ width: 888px; margin: 0 auto; padding:0; overflow:hidden; clear: both; }

.ad881{ width: 888px; margin: 0 auto; padding:3px 0; overflow:hidden; clear: both; }

/* ========== 网奇焦点 ====== */

.topnews_tt{width:316px;}

.topnews {border:1px #ccc solid;border-top:none;height:235px;width:314px;text-align:left;}

.topnewsn {padding:2px;margin:3px;clear: both; background:url("style/index/top_line.gif")}

.topnewsr {padding:2px;margin:3px;clear: both; background:url("style/index/top_line1.gif")}

.lblOn{width:158px;height:24px;text-align:center;overflow:hidden;background:url(style/index/topnews_l.gif);color:#fff; font-size: 12px;float:left;}

.lblOff{width:158px;height:24px;text-align:center;overflow:hidden;background:url(style/index/topnews_r.gif);color:#DB692A;float:left;}

.lblOn div,.lblOff div{padding-top:7px;}

.vipic{width:121px;text-align:center; height:258px;}

/* ========== 站内搜索 ========== */

.searchw {border: #e4e4e4 1px solid; margin-top:3px;width:440px;}

.searchn {border: #fff 1px solid; background-color:#e4e4e4; height:19px;}

.inputbg { border:1px solid #C7C7C7; height:12px}

/* ========== 投票 ========== */

.pollSubmit {background:url(style/index/tp.gif);width:40px;height:21px;border:0;}

.pollView {background:url(style/index/ck.gif);width:40px;height:21px;border:0;}

/* ========== 网站公告 ====== */

.boxtt .gtl{ background:url(style/index/GetBulletin_l.gif); width:34px; height:24px;}

.boxtt .gtm{ background:url(style/index/GetBulletin_m.gif); width:402px; height:24px; line-height:24px;}

.boxtt .gtm span {display:none}

.boxtt .gtr{ background:url(style/index/GetBulletin_r.gif); width:6px; height:24px;}

.boxtt .gbl{ background:url(style/index/GetBulletin_q.gif); width:7px; height:24px;}

.boxtt .gbm{ background:url(style/index/GetBulletin_w.gif); width:239px; height:24px;}

.boxtt .gbr{ background:url(style/index/GetBulletin_e.gif); width:196px; height:24px;}

.boxtt .gtm .gg a:link, .boxtt .gtm .gg a:visited {color: #FFF; text-decoration:none}

.boxtt .gtm .gg a:hover {color: #FFF; text-decoration:none }

/* ========== 客户案例 ====== */

.works{ width: 888px; margin: 0 auto; padding:0; overflow:hidden; clear: both; }

.works h5{ line-height:24px; padding:0 10px; font-size:12px;color:#FFF; font-weight:normal;}

.wq_box{ width:442px; overflow:hidden; float:left;}

.boxtt{ width:442px; overflow:hidden; }

.boxtt .tl{ background:url(style/index/bbs_l.gif); width:30px; height:24px;}

.boxtt .tm{ background:url(style/index/works_m.gif); width:405px; height:24px; text-align:left;}

.boxtt .tr{ background:url(style/index/bbs_r.gif); width:7px; height:24px;}

.boxtt span{float:right; margin:10 5px;text-align:left;}

.m3{height:3px;font-size:0px;}

.m4{ margin-left:4px;}

.m5 {padding-top:6px;}

.boxConl{ width:440px; overflow:hidden;border-left:1px solid #B9DD71;border-right:1px solid #B9DD71;}

.boxbl{ width:440px; background: #EDEDED;height:19px; line-height:19px;color: #5F820C;border:1px solid #B9DD71;border-top:none;}

.boxbl a:link,.boxbl a:visited { color: #5F820C;text-decoration:none}

.boxbl a:hover { color: #5F820C; text-decoration:underline}

.conBox { width:426px;float:left;overflow:hidden;}

.boxConl .lAn{ width:7px; float:left;}

.boxConl .lAn img{ margin-top:38px; cursor:pointer; }

.boxConl .lPic{ width:424px; float:left;text-align:center;}

/* ========== 模板超市 ====== */

.boxConr{ width:440px;overflow:hidden;border-left:1px solid #8CCDDF;border-right:1px solid #8CCDDF;}

.boxConr .rAn{ width:7px; float:left;}

.boxConr .rAn img{ margin-top:38px; cursor:pointer; }

.boxConr .rPic{ width:424px; float:left;}

.conBoxr { width:426px;float:left;overflow:hidden;}

.boxtt .mtl{ background:url(style/index/GetPoll_l.gif); width:31px; height:24px;}

.boxtt .mtm{ background:url(style/index/GetPoll_m.gif); width:404px; height:24px;text-align:left;}

.boxtt .mtr{ background:url(style/index/GetPoll_r.gif); width:7px; height:24px;}

.boxel{ background: #EDEDED;height:19px; text-align:center; line-height:19px;color: #2B90AE;border:1px solid #8CCDDF;border-top:none;}

.boxel a:link,.boxel a:visited { color: #2B90AE;text-decoration:none}

.boxel a:hover { color: #2B90AE; text-decoration:underline}

.m6{height:0px;font-size:0px;overflow:hidden;}

/* ========== VIP会员 ========== */

.vipmain {width:442px;}

.vipt1 {width:105px; height:24px;}

.vipl { width:150px;text-align:center;float:left; padding-top:6px;}

.vipr {width:288px;float:left;text-align:left;padding-top:6px;background:url("style/index/vip_line.gif")}

.trr{background:url("style/index/vip_tr.gif"); height:24px; width:73px;float:left;}

.tr_more{background:url("style/index/vip_tr_more.gif"); height:24px; width:51px;float:left;}

.vipmm{border:#8FD6EC 1px solid;border-top:none; height:233px;width:440px;clear: both; text-align:left }

.lb2On2{width:105px;height:24px;text-align:center;overflow:hidden;background:url(style/index/vip_t1.gif);color:#fff;float:left;}

.lb2Off{width:105px;height:24px;text-align:center;overflow:hidden;background:url(style/index/Switching3.gif);color:#55AAC7;float:left;}

.lb2On{width:105px;height:24px;text-align:center;overflow:hidden;background:url(style/index/Switching2.gif);color:#FFF;float:left;}

.lb2On div,.lb2Off div,.lb2On2 div{padding-top:7px;}

.lb_line {background:url(style/index/Switching4.gif);height:24px; width:1px; float:left;}

/* ========== 鼠标 ========== */

.cursor-pointer{cursor:pointer;}

/* ========== 产品说明 ========== */

#in_41{border:2px solid #62C0DC;height:518px;width:410px;text-align:center; float:left}

#in_42{border:2px solid #93BB36;height:518px;width:410px;float:left}

#in_43{border:2px solid #E67330;height:518px;width:410px;float:left}

#in_44{border:2px solid #55709B;height:518px;width:410px; text-align:center; float:left}

.in_left{float:left;width:28px;}

#in_41 .list {clear: both; text-align:left}

#in_41 h5{color:#45A0BD; font-size:12px; height:25px;line-height:25px; text-align:center;background:url(style/index/sm_line.gif);}

#in_42 h5{color:#89B031; font-size:12px; height:25px;line-height:25px; text-align:center;background:url(style/index/sm_line.gif);}

#in_43 h5{color:#f60; font-size:12px; height:25px;line-height:25px; text-align:center;background:url(style/index/sm_line.gif);}

#in_41 .ico{ width:150px; text-align:left; height:214px; vertical-align:middle;}

#in_41 .iw_tright{width:247px; text-align:left;}

#in_41 .line,#in_42 .line,#in_43 .line,#in_44 .line { background:url(style/index/iw_line.gif); line-height:25px;}

#in_41 .line1,#in_42 .line1,#in_43 .line1 { background:url(style/index/iw_line1.gif); height:22px;width:387px;}

#in_41 .pic{ text-align:center;width:160px;}

#in_41 .pic .img { padding-top:12px;}

#in_41 .new { width:237px; background-color:#F2F2F2}

#in_41 ul,#in_42 ul {}

#in_41 ul li,#in_42 ul li,#in_43 ul li {height:17px;background:url("style/index/bullet2.gif") no-repeat 0px ;background-position:left 7px;padding-top:4px;padding-left:15px; }

#in_42 .line span {color:red}

#in_44 .line{height:28px; background:url(style/index/cp_ico_line.gif);width:387px;overflow:hidden;}

#in_44 .div{width:387px;overflow:hidden;}

#in_44 .l{ height:43px; width:187px; float:left}

#in_44 .r{ margin-left:13px;height:43px; width:187px;float:left}

/* ========== 虚拟主机 ========== */

.host {width:442px; overflow:hidden; float:left;}

.host ul {}

.host ul li {height:17px;background:url("style/index/bullet2.gif") no-repeat 0px ;background-position:left 7px;padding-top:4px;padding-left:15px; width:190px;}

.host .list{width:442px; overflow:hidden;clear: both; text-align:left;}

.host .list2{width:440px; overflow:hidden;clear: both; text-align:left;}

.host .tl {width:132px;text-align:center;height:108px;padding-top:12px;}

.host .tm {width:200px; text-align:left;padding-top:12px; line-height:20px;}

.host .tr {width:93px; text-align:left;padding-top:12px;}

.host .mm {border:#8FD6EC 1px solid;border-top:none; height:236px;width:440px;clear: both;}

.host .ml {width:225px;float:left;}

.host .mr { width:213px;float:left;}

.host .tatle {height:34px;clear: both;}

.host .list2 ul{background:url("style/index/host_line.gif");clear: both;}

.host .list2 li{ height:17px;background:url("style/index/bullet2.gif") no-repeat 0px;background-position:left 7px;padding-top:4px;}

.host .domain{ text-align:left;background:url("style/index/domain_line.gif");}

.host .list2 .text {width:306px; margin:5px; line-height:20px; height:108px;padding-top:12px;}

.host .list2 .ren {width:114px;}

.host .list2 .system { padding-top:12px;}

.host .list2 .systext {color:#1B7D98; height:34px; line-height:34px;}

.host .list2 .systextt { width:182px;}

.host .list2 .systextt ul{background:url("style/index/sys_line.gif");clear: both;}

.host .list2 .systextt li{ height:17px;background:url("style/index/bullet2.gif") no-repeat 0px ;background-position:left 7px;padding-top:4px;}

.host .list2 .text1{line-height:23px; text-align:left;padding-top:12px;}

/* ========== 加盟代理 ========== */

.Acting {}

.Acting .tt{width:220px;}

.Acting .tl{width:30px; height:24px; background:url("style/index/bbs_l.gif");float:left;}

.Acting .tm{width:183px; height:24px; background:url("style/index/works_m.gif");float:left;line-height:24px;text-align:left;}

.Acting .tr{width:7px; height:24px; background:url("style/index/bbs_r.gif");float:left;}

.Acting .mm{width:218px; height:222px; border:1px #9EDC3B solid;border-top:none;text-alitn:center;clear: both;}

.Acting h3{ color:#EE940A; font-size: 14px; text-alitn:center;height:25px; line-height:25px; clear: both; }

.Acting .line { background:url(style/index/Ac_line.gif);line-height:23px;text-align:left; clear: both;margin:5px; }

.Acting .mm_bbs{width:218px; height:222px;background:url(style/index/bgbbs.gif); border:1px #9EDC3B solid;border-top:none;text-alitn:center;clear: both; }

.Acting .line_bbs { line-height:21px;width:192px;text-align:left;padding-left:18px;padding-top:5px; }

.Acting .pic { text-align:center;}

.Acting span{float:right; margin:10 5px;text-align:left;}

/* ========== 爱网页 ========== */

.down {}

.down .tt{width:218px;}

.down .tl{width:30px; height:24px; background:url("style/index/down_l.gif");float:left;}

.down .tm{width:181px; height:24px; background:url("style/index/down_m.gif");float:left;line-height:24px;text-align:left;}

.down .tr{width:7px; height:24px; background:url("style/index/down_r.gif");float:left;}

.down .mm{width:216px; height:222px; border:1px #6279A3 solid;border-top:none;clear: both;text-align:left;}

.down .line {width:210px;text-align:left;padding-top:9px;background:url("style/index/bgbbs.gif) no-repeat"); }

.down .line_bbs {line-height:21px;text-align:left;padding-left:22px;width:188px; padding-top:5px; background:url(style/index/bgbbs.gif) no-repeat;}

.down span{float:right; margin:10 5px;text-align:left;}

/* ========== 网络营销 ========== */

.Marketing {}

.Marketing .tt{width:220px;}

.Marketing .tl{width:30px; height:24px; background:url("style/index/menu_l.gif");float:left;}

.Marketing .tm{width:183px; height:24px; background:url("style/index/menu_m.gif");float:left;line-height:24px;text-align:left;}

.Marketing .tr{width:7px; height:24px; background:url("style/index/menu_r.gif");float:left;}

.Marketing .mm{width:218px; height:222px; border:1px #EB864E solid;border-top:none;clear: both;}

.Marketing .text {margin:0 6px 0 6px;text-align:left; line-height:20px; background:url("style/index/mark_line.gif");}

.Marketing span{float:right; margin:10 5px;text-align:left;}

/* ========== 网站调查 友情链接 ========== */

.GetPoll {}

.GetPoll .tt{width:217px;}

.GetPoll .tl{width:31px; height:24px; background:url("style/index/GetPoll_l.gif");float:left;}

.GetPoll .tm{width:179px; height:24px; background:url("style/index/GetPoll_m.gif");float:left;line-height:24px;text-align:left;}

.GetPoll .tr{width:7px; height:24px; background:url("style/index/GetPoll_r.gif");float:left;}

.GetPoll .mm{width:215px; height:222px; border:1px #81CCE3 solid;border-top:none;clear: both;text-align:center;}

.GetPoll span{float:right; margin:10 5px;text-align:left;}

/* 服务导航 */

.SortNav {width:442px;clear: both;}

.SortNav .tt{width:442px;}

.SortNav .tl{width:30px; height:24px; background:url("style/index/menu_l.gif");float:left;}

.SortNav .tm{width:405px; height:24px; background:url("style/index/menu_m.gif");float:left;line-height:24px;text-align:left;}

.SortNav .tr{width:7px; height:24px; background:url("style/index/menu_r.gif");float:left;}

.SortNav .mm{width:440px; height:222px; border:1px #EB864E solid;border-top:none;clear: both;}

.SortNav .list{width:440px;clear: both;}

.SortNav .menu{float:left; width:96px; text-align:center;}

.SortNav .menu h5{color:#f60;font-size: 12px; }

.SortNav .menu1{float:left;line-height:22px;width:340px;text-align:left;}

.SortNav .bg1 {background:url("style/index/SortNav_bg.gif") 0 0 no-repeat;height:23px;}

.SortNav .line{background:url("style/index/SortNav_line.gif");height:7px;font-size:0px;width:430px;clear: both;}

.SortNav span{float:right; margin:10 5px;text-align:left;}

/* ========== Copyright ========== */

.foot_nav {width:888px;height:28px;line-height:28px;color: #fff; text-align:center; background:url("style/index/foot_nav.gif");}

.foot_nav a:link{ color: #ffffff;text-decoration:none}

.foot_nav a:hover { color: #fff; text-decoration:underline}

.foot_nav a:visited { color: #fff;}

.foot_nav span { width:50px;}

.copyright { line-height:35px;padding:8px;}

--

/style

css和html的作用和区别

Hypertext Markup Language, 中文也就是超文本链接标示语言。HTML(HyperTextMark-upLanguage)即超文本标记语言,目的是为了能把存放在一台电脑中的文本或图形与另一台电脑中的文本或图形方便地联系在一起,形成有机的整体,人们不用考虑具体信息是在当前电脑上还是在网络的其它电脑上。我们只需使用鼠标在某一文档中点取一个图标,Internet就会马上转到与此图标相关的内容上去,而这些信息可能存放在网络的另一台电脑中。 HTML文本是由HTML命令组成的描述性文本,HTML命令可以说明文字、图形、动画、声音、表格、链接等。HTML是网络的通用语言,一种简单、通用的全置标记语言。它允许网页制作人建立文本与图片相结合的复杂页面,这些页面可以被网上任何其他人浏览到。

CSS语言是"Cascading Style Sheets "的缩写,中文翻译为"层叠式样式表单",它是由W3C协会制定并发布的一个网页排版式标准,是对HTML语言功能的补充。主要的用途是对网页中字体、颜色、背景、图像及其他各种元素的控制,使网页能够完全按照设计者的要求来显示。CSS语言是一个用于网页排版的标记性语言。css给html标记添加各种样式,用来告诉浏览器,因该如何显示这些标记里面的内容。

Markdown——CSS达成图片居中等排版方法

使用Md可以提升写作效率,同时增强文章排版的工整规范性,因此越来越多人尝试使用Md取代传统富文本编辑器作为写作工具。

如果将Md看作是一门语言,那么与其最恰似的应当就是我们经常接触到的HTML——它们都是面向结构的语言。

因此,使用Md最大的问题是,本身的样式并不丰富。虽然有诸如Mou这种定制功能的Md工具可以很方便地控制基本样式,也有Typora这种支持Md × HTML的Md拓展,但是本身也有无法忽视的缺点:

因此我们要朝着以下方向去发展:

举一个最近发现的小例子:我想对特定的某几张图片进行居中。

一般来说,像这种,图片是通过默认样式 img进行居中的,而在sf.gg中,这个img默认是没有对齐的样式的,也就是直接向左对齐。

那如果我需要对图片A居中,而图片B左对齐,在这两个网站中,仅仅通过Md几乎无法实现。

首先复习一下img的Md语法:

内联写法:

外联写法:

在绝大多数情况下,这个alt是不会出现在页面中的——除非你的图片加载不出来。

因此,我们换种说法就是,这个alt是作为一种“退化”属性存在的,为的是让你在加载不出图片的情况下也能给用户一些图片的描述信息。

而title属性是当你将鼠标移动到图片上时会有一个跟随鼠标的小型提示器,用到的机会比alt频繁。

那么看回img的Md语法,总共有三个可以给我们使用的参数:

其中,title太常用,因此放到最后,alt在需要SEO的场景中比较重要,我们放到第二,而剩下的url理应就是我们的最好选择

结合一下css的属性选择器,我们可以配合css对这几个参数进行客制。

一般我们要把img居中,都会选择在img的父级中添加

这也是最标准的写法,不会改变img原本的display。但是很显然,我们无法单纯通过CSS来找到img的父级。

但是标题说了通过CSS来实现,那就不能使用JS了。因此在CSS不能爬树找父级的情况下,我们还是专注回img本身。

如果我们加入这样一个css:

$='center' 的意思是以 center 结尾的 src 属性,这里的用法是,在我们需要居中的图片中的url部分加上?center即可。

由于在HTTP协议中,问号后的参数不会改变请求资源本身,因此即使带参请求,只要后端没有特殊处理,那么这个图片本身的引用是不会有问题的。

那居左居右的排版也可以用这种方式去,甚至我们还能通过这种方式去设置缩放、旋转、偏转等效果。

有哪些Markdown的CSS样式表推荐

body{

margin: 0 auto;

font-family: "Microsoft YaHei", arial,sans-serif;

color: #444444;

line-height: 1;

padding: 30px;}@media screen and (min-width: 768px) {

body {

width: 748px;

margin: 10px auto;

}}h1, h2, h3, h4 {

color: #111111;

font-weight: 400;

margin-top: 1em;}h1, h2, h3, h4, h5 {

font-family: Georgia, Palatino, serif;}h1, h2, h3, h4, h5, p , dl{

margin-bottom: 16px;

padding: 0;}h1 {

font-size: 48px;

line-height: 54px;}h2 {

font-size: 36px;

line-height: 42px;}h1, h2 {

border-bottom: 1px solid #EFEAEA;

padding-bottom: 10px;}h3 {

font-size: 24px;

line-height: 30px;}h4 {

font-size: 21px;

line-height: 26px;}h5 {

font-size: 18px;

list-style: 23px;}a {

color: #0099ff;

margin: 0;

padding: 0;

vertical-align: baseline;}a:hover {

text-decoration: none;

color: #ff6600;}a:visited {

/*color: purple;*/}ul, ol {

padding: 0;

padding-left: 24px;

margin: 0;}li {

line-height: 24px;}p, ul, ol {

font-size: 16px;

line-height: 24px;}ol ol, ul ol {

list-style-type: lower-roman;}/*pre {    padding: 0px 24px;    max-width: 800px;    white-space: pre-wrap;}code {    font-family: Consolas, Monaco, Andale Mono, monospace;    line-height: 1.5;    font-size: 13px;}*/code, pre {

border-radius: 3px;

background-color:#f7f7f7;

color: inherit;}code {

font-family: Consolas, Monaco, Andale Mono, monospace;

margin: 0 2px;}pre {

line-height: 1.7em;

overflow: auto;

padding: 6px 10px;

border-left: 5px solid #6CE26C;}pre  code {

border: 0;

display: inline;

max-width: initial;

padding: 0;

margin: 0;

overflow: initial;

line-height: inherit;

font-size: .85em;

white-space: pre;

background: 0 0;}code {

color: #666555;}/** markdown preview plus 对于代码块的处理有些问题, 所以使用统一的颜色 *//*code .keyword {  color: #8959a8;}code .number {  color: #f5871f;}code .comment {  color: #998}*/aside {

display: block;

float: right;

width: 390px;}blockquote {

border-left:.5em solid #eee;

padding: 0 0 0 2em;

margin-left:0;}blockquote  cite {

font-size:14px;

line-height:20px;

color:#bfbfbf;}blockquote cite:before {

content: '\2014 \00A0';}blockquote p {

color: #666;}hr {

text-align: left;

color: #999;

height: 2px;

padding: 0;

margin: 16px 0;

background-color: #e7e7e7;

border: 0 none;}dl {

padding: 0;}dl dt {

padding: 10px 0;

margin-top: 16px;

font-size: 1em;

font-style: italic;

font-weight: bold;}dl dd {

padding: 0 16px;

margin-bottom: 16px;}dd {

margin-left: 0;}/* Code below this line is copyright Twitter Inc. */button,input,select,textarea {

font-size: 100%;

margin: 0;

vertical-align: baseline;

*vertical-align: middle;}button, input {

line-height: normal;

*overflow: visible;}button::-moz-focus-inner, input::-moz-focus-inner {

border: 0;

padding: 0;}button,input[type="button"],input[type="reset"],input[type="submit"] {

cursor: pointer;

-webkit-appearance: button;}input[type=checkbox], input[type=radio] {

cursor: pointer;}/* override default chrome  firefox settings */input:not([type="image"]), textarea {

-webkit-box-sizing: content-box;

-moz-box-sizing: content-box;

box-sizing: content-box;}input[type="search"] {

-webkit-appearance: textfield;

-webkit-box-sizing: content-box;

-moz-box-sizing: content-box;

box-sizing: content-box;}input[type="search"]::-webkit-search-decoration {

-webkit-appearance: none;}label,input,select,textarea {

font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;

font-size: 13px;

font-weight: normal;

line-height: normal;

margin-bottom: 18px;}input[type=checkbox], input[type=radio] {

cursor: pointer;

margin-bottom: 0;}input[type=text],input[type=password],textarea,select {

display: inline-block;

width: 210px;

padding: 4px;

font-size: 13px;

font-weight: normal;

line-height: 18px;

height: 18px;

color: #808080;

border: 1px solid #ccc;

-webkit-border-radius: 3px;

-moz-border-radius: 3px;

border-radius: 3px;}select, input[type=file] {

height: 27px;

line-height: 27px;}textarea {

height: auto;}/* grey out placeholders */:-moz-placeholder {

color: #bfbfbf;}::-webkit-input-placeholder {

color: #bfbfbf;}input[type=text],input[type=password],select,textarea {

-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;

-moz-transition: border linear 0.2s, box-shadow linear 0.2s;

transition: border linear 0.2s, box-shadow linear 0.2s;

-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);

-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);

box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);}input[type=text]:focus, input[type=password]:focus, textarea:focus {

outline: none;

border-color: rgba(82, 168, 236, 0.8);

-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);

-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);

box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);}/* buttons */button {

display: inline-block;

padding: 4px 14px;

font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;

font-size: 13px;

line-height: 18px;

-webkit-border-radius: 4px;

-moz-border-radius: 4px;

border-radius: 4px;

-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);

-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);

box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);

background-color: #0064cd;

background-repeat: repeat-x;

background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));

background-image: -moz-linear-gradient(top, #049cdb, #0064cd);

background-image: -ms-linear-gradient(top, #049cdb, #0064cd);

background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));

background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);

background-image: -o-linear-gradient(top, #049cdb, #0064cd);

background-image: linear-gradient(top, #049cdb, #0064cd);

color: #fff;

text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);

border: 1px solid #004b9a;

border-bottom-color: #003f81;

-webkit-transition: 0.1s linear all;

-moz-transition: 0.1s linear all;

transition: 0.1s linear all;

border-color: #0064cd #0064cd #003f81;

border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}button:hover {

color: #fff;

background-position: 0 -15px;

text-decoration: none;}button:active {

-webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);

-moz-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);

box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);}button::-moz-focus-inner {

padding: 0;

border: 0;}table {

*border-collapse: collapse; /* IE7 and lower */

border-spacing: 0;

width: 100%;}table {

border: solid #ccc 1px;

-moz-border-radius: 6px;

-webkit-border-radius: 6px;

border-radius: 6px;

/*-webkit-box-shadow: 0 1px 1px #ccc;    -moz-box-shadow: 0 1px 1px #ccc;    box-shadow: 0 1px 1px #ccc;   */}table tr:hover {

background: #fbf8e9;

-o-transition: all 0.1s ease-in-out;

-webkit-transition: all 0.1s ease-in-out;

-moz-transition: all 0.1s ease-in-out;

-ms-transition: all 0.1s ease-in-out;

transition: all 0.1s ease-in-out;}table td, .table th {

border-left: 1px solid #ccc;

border-top: 1px solid #ccc;

padding: 10px;

text-align: left;}table th {

background-color: #dce9f9;

background-image: -webkit-gradient(linear, left top, left bottom, from(#ebf3fc), to(#dce9f9));

background-image: -webkit-linear-gradient(top, #ebf3fc, #dce9f9);

background-image:    -moz-linear-gradient(top, #ebf3fc, #dce9f9);

background-image:     -ms-linear-gradient(top, #ebf3fc, #dce9f9);

background-image:      -o-linear-gradient(top, #ebf3fc, #dce9f9);

background-image:         linear-gradient(top, #ebf3fc, #dce9f9);

/*-webkit-box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;    -moz-box-shadow:0 1px 0 rgba(255,255,255,.8) inset;    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;*/

border-top: none;

text-shadow: 0 1px 0 rgba(255,255,255,.5);

padding: 5px;}table td:first-child, table th:first-child {

border-left: none;}table th:first-child {

-moz-border-radius: 6px 0 0 0;

-webkit-border-radius: 6px 0 0 0;

border-radius: 6px 0 0 0;}table th:last-child {

-moz-border-radius: 0 6px 0 0;

-webkit-border-radius: 0 6px 0 0;

border-radius: 0 6px 0 0;}table th:only-child{

-moz-border-radius: 6px 6px 0 0;

-webkit-border-radius: 6px 6px 0 0;

border-radius: 6px 6px 0 0;}table tr:last-child td:first-child {

-moz-border-radius: 0 0 0 6px;

-webkit-border-radius: 0 0 0 6px;

border-radius: 0 0 0 6px;}table tr:last-child td:last-child {

-moz-border-radius: 0 0 6px 0;

-webkit-border-radius: 0 0 6px 0;

border-radius: 0 0 6px 0;}

“htmL css”如果窗口缩小,页面样式就错乱怎么解决?

如果窗口缩小,页面样式错乱就要对每个元素设置长宽、浮动、定位保证每个元素唯一。

HTML中引入CSS样式的形式:

1、正常引入

link href="/build/welcome.css" rel="stylesheet"。

2、按需引入

在需要的时候通过js引入。


标题名称:css样式mark,css样式margin的默认值
当前网址:http://scyingshan.cn/article/hocoej.html