λ在Chito的第二個CSS設置[原主題:SimpleModern]
第一個設置見「λ在Chito的第一個CSS配置[原主題:Earthy]」
大致特徵
-
字體按百分比來設置(
%
|em
|ex
|px
) - 準備好了供Windows/Linux系統用的備選字體
-
回覆列表有較好的縮進效果(
Blog設置
::使用Thread Comment
) - 對IE用戶不怎麼友好
- 只對這些插件樣式進行了修改:隨機文章,鏈接,RSS訂閱,搜索,計數器,相關文章
- SyntaxHighlighter無法設置……
具體細節
- 裝飾了原Chito導航欄(看到那個ProjectEuler了吧?)
-
鏈接都加上了「∷」標記(
|a:before
)a:after
- 裝飾了各級標題(沒自動加章節號)
- 列表、塊引用、段落都有縮進,表格除外
- 美化了段內引用(q)和塊引用(blockquote),和圖片框(兼容MathJAX)
- 回覆列表不但有縮進,還標示了每個最後嵌套的回覆是哪個
個人添置[不在以下的代碼裡]
- 增加對IE用戶的友好提示……
-
設置了Ubuntu的多種格式WebFont(
woff
|eot
|ttf
|svg
)
CSS代碼參考
預覽部分CSS測試效果請至:http://jakwings.is-programmer.com/posts/30319.html
上次修正時間:2012年5月8日 23:30
修正內容:
- 去掉表格缩进。
- 段落縮進還是不用
:before {content...來設置了,改回text-indent了。- 发现自建页面没有缩进,故改
#article_content为#article_body- 改用#XXXXXX颜色表示值&改善默认字体设置
- 更改文章内容中列表、段落、表格、图片缩进样式
- 修正背景色变换失效问题
- 修正上下篇文章标志
- 不加<br>缩进了
- Firefox中鏈接顏色問題解決&回覆框的回覆按鈕消失問題解決
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | /*-----------------------------------------------------------------*\ | 2012 LinuxGem | Design by jakwings.is-programmer.com | | Theme: Simple-ex | | Modified by lambda | | Last update: May.8, 2012 | \*-----------------------------------------------------------------*/ /* 只适用于这个原主题的页面哦~到后台管理设置外观 */ /*=================================================================*\ | Body | \*=================================================================*/ /* 把这个body(整个页面内容)放到最前,设置好默认的东西。 * margin即「排斥其它元素的边界」 * padding即「把内容往内压挤的边界」 * 长度单位有两种,一种是按比例来的,不太适合打印,适合屏幕显示: * em(字体高度), ex(字母x的高度), %(继承大小百分比), px(像素pixels) * 另一种是绝对的,就是方便打印的了: * pt(点), pc(皮卡picas), in(英寸), cm(厘米), mm(毫米) * font-family中的字体从左到右,后面的都是备用的,最后一个sans-serif是根据浏览器设置确定的,通用 */ body { width : 95% ; margin : auto ; padding : 0 ; font-size : 15px ; font-family : "明兰" , "文泉驿微米黑" , "微软雅黑" , "宋体" , "细黑体" , Ubuntu, Arial , sans-serif ; line-height : 140% ; color : #000000 ; background-color : #FDFDFD ; background-image : none ; } /*=================================================================*\ | Font-Size & Text-Style | \*=================================================================*/ /* h1-6 是标题 * bold 粗体 * margin: 顶 右 底 左 相当于 margin-width: 顶 右 底 左 * letter-spacing 字符的间隔 * text-align 文字的 */ h 1 , h 2 , h 3 , h 4 , h 5 , h 6 { padding : 0 ; margin : 1.2em 0 0 0 ; font-weight : bold ; line-height : 150% ; letter-spacing : 1px ; color : #000000 ; text-align : left ; } h 1 { font-size : 200% ; border-top : 1px solid #777 ; border-bottom : 1px solid #AAAAAA ; } h 2 { font-size : 170% ; border-bottom : 1px dotted #000000 ; } h 3 { font-size : 150% ; } h 4 { font-size : 130% ; } h 5 { font-size : 120% ; } h 6 { font-size : 105% ; } /* p是段落 * display: none 即不显示,也不占体积 */ p { display : block ; line-height : 120% ; margin : 0.5em 0 0.5em 0 ; text-align : left ; } /* 以下是各种字体样式 */ /* 缩小 */ small { font-size : smaller ; } /* 放大 */ big { font-size : larger ; } /* 粗体 */ strong, b { font-weight : bolder ; } /* 代码 */ tt, code , kbd, samp { font-family : Courier , "文泉驿等宽微米黑" , monospace ; } /* 下划线 插入 */ u, ins { text-decoration : underline ; } /* 删除线 */ s, strike, del { text-decoration : line-through ; } /* 斜体 强调 地址 变量 引用(不是quote或blockquote) */ i, cite, em, var, address { font-style : italic ; } /* 字体样式结束 */ /* 水平分隔线 */ hr { display : block ; margin : 0.5em auto 0.5em auto ; border-style : inset ; border-width : 1px ; } /* ul 列表,前有数字 * ol 列表,前有黑点 * list-style-position 标记符号的位置(1. 2. 3.) */ ul, ol { text-align : left ; margin : 0.5em 0 0.5em 0em ; padding : 0 5px 0 2em ; list-style-position : outside ; } /* 列表项目 */ li { margin : 0.2em 0 0.2em 0 ; } /* 为行内引用(inline-quote)添加前后引号 */ q:before { content : open-quote } q:after { content : close-quote } /* q 行内引用(inline-quote) * border-radius 边框四个角的弧度 * quotes 引号内容 */ q { margin : 0 ; padding : 0 ; background : #F0F8FF ; quotes : "" "" ; border-radius: 2px ; } /* :hover 即鼠标移到上面的效果 */ q:hover { color : #FF0000 ; } /* 块引用 * color 的值主要有三种格式:#xxxxxx 颜色名称 rgb(r,g,b) */ blockquote{ color : #202020 ; margin-left : 2em ; padding : 0px 5px 0px 5px ; background : #EFF2DF ; border : 1px #A9A9A9 ; border-style : dotted dashed ; } blockquote:hover { background : #BECB69 ; color : #000000 ; border-style : solid ; } /*=================================================================*\ | Container | \*=================================================================*/ /* Top-Nav 导航栏 * small-caps 是全大写,首字符加大的样式 * !important 可提高优先级 */ #top-nav { font-size : 125% !important ; text-transform : none !important ; font-variant : small-caps !important ; } /* 导航栏的项目 */ .page_item { border-top : 3px ridge !important ; border-bottom : 3px ridge !important ; border-radius: 10px !important ; margin-left : 5px !important ; } /* Content 内容 * # 表示那是元素的id,像body那样不用加的叫做标签(tags e.g. <body></body>) * float 即浮动设置,none表示不浮动 */ #content { float : none ; padding : 0 ; margin : 0 ; width : 100% ; font-size : 100% ; background-color : #FDFDFD ; text-align : inherit; } /* Header 博客标题 */ #header { margin : 0 ; padding : 0 ; } /* 标题文字 */ #headertext h 1 { text-align : center ; font-size : 300% ; } /* 标题标注 */ #headertext .description { margin-top : 5px ; font-size : 130% ; text-transform : uppercase ; } /* Entry Title 文章标题 */ .post h 2 { font-size : 150% ; text-align : left ; font-variant : small-caps ; line-height : 140% ; font-weiight: bold ; border-top : 1px solid ; padding-top : 5px ; } /* text-shadow 字体阴影 * FILTER 是IE8下用的阴影设置 */ .post h 2 , .post h 2: hover { text-shadow : #D3D3D3 0px 0px 20px ; FILTER: Shadow(Color= #E9E9E7 , Direction= 135 , Strength= 1 ); } /* 文章简介 */ .post_brief { padding-left : 5px ; font-size : 95% ; } /* 继续阅读 */ .read-more.align- right { text-align : right ; margin : 0 ; padding-right : 5px ; font-size : 105% ; } /* 文章相关信息 */ .postmetadata { background : transparent ; padding : 0 ; margin : 0 ; font-size : 80% ; border-top : 1px solid #F8F8FF ; border-bottom : 1px solid #F8F8FF ; } /* Article 文章 */ #article_wrap { margin-top : 0 !important ; } /* 页首 * line-height 行高 */ #article_header { color : #000000 ; margin : 0 ; padding-left : 2em ; line-height : 140% ; font-size : 90% ; margin-top : 1em ; margin-bottom : 1em ; letter-spacing : 1px ; } /* 页身 */ #article_body { font-size : 100% ; letter-spacing : 1px ; line-height : 120% ; margin : 0 ; padding : 0 0 0 1.7em ; } /* 段落缩进 */ #article_body p:not([style*= "right" ]):not([style*= "center" ]) { text-indent : 2em ; } /* 列表缩进 */ #article_body ul, #article_body ol { margin-left : 2em ; } /* 图片边框效果 * box-shadow 边框阴影 * transparent 透明 */ #article_body img { border : 1px solid #808080 ; border-radius: 5px ; padding : 5px ; margin : 0.5em ; background-color : transparent ; box-shadow: 1px 1px 5px rgba( 132 , 133 , 8 , 0.5 ); } #article_body img:hover { box-shadow: 1px 1px 10px rgba( 132 , 133 , 8 , 0.5 ); } /* MathJAX公式图片 */ nobr img, nobr img:hover { border : 0 !important ; border-radius: 0 !important ; box-shadow: 0 0 !important ; padding : 0 !important ; margin : 0 !important ; } /* 页脚 */ .articlefooter { background : transparent ; border-top : 1px solid #ACACAC ; padding : 3px 4px 4px 4px ; margin-top : 3em ; margin-bottom : 5px ; border-bottom : 1px solid ; } /* Pre/Next Article 同一分类文章前后导航 */ div.pre_next_post { margin : 5px 0 2em 0px ; width : 100% ; border-bottom : 1px dashed #808000 ; height : 1.5em ; float : right ; } div.pre_next_post a { display : block ; font-size : 100% ; line-height : 100% ; } /* 导航栏 */ a.down { background : none ; padding : 0 ; float : right ; } a.up { background : none ; padding : 0 ; float : left ; } /* 导航栏标记 */ a.down:before { content : "▶▷∷" !important ; } a.up:after { content : "∷◁◀" !important ; } /* Comment 文章评论 */ /* textarea 文本框 * #comment_content 评论内容 */ textarea#comment_content { width : 90% ; display : inline ; } /* 头 */ .comment_header { display : inline ; background : none ; border : 0 ; float : right ; margin : 0 ; padding : 0 ; } /* 身 */ .comment_content { padding : 0 0 1em 48px ; border-left : 2px ridge #808000 ; } /* 评论序数 */ .comments_count { display : none ; } /* last-child 评论嵌套的最内层元素 */ .comment_body:last-child .relative_time_comment:after { content : " Latest-Reply" ; color : #4682B4 ; } /* Twitter按钮 */ .twitter_comment_button { display : none ; } /* 下面的懒得说 */ .comment_box { padding : 0 ; width : 95% ; margin-left : 10px ; margin-bottom : 0 ; background : #FAFAFA ; margin-top : 0 ; border-top : 1px solid #F8F8FF ; border-bottom : 0 ; border-left : 0 ; border-right : 1px dashed #F8F8FF ; } .reply_comment_box { float : right ; margin-top : -1.5em ; padding-left : 0 ; padding-bottom : 2.5em ; padding-top : 0 ; background : transparent !important ; border : 0 ; width : 95% ; } .reply_comment_box:last-child { padding-left : 0 ; padding-bottom : 0.5em ; padding-top : 0 ; background : transparent !important ; border-top : 1px inset #F8F8FF ; width : 99.4% ; } /* Avatar头像 */ .comment_avatar { float : left ; padding : 5px ; } .comment_avatar img { width : 36px ; } /* 回复输入框 */ input:focus, textarea:focus { background : #BECB69 ; color : #000000 ; } /* Footer 博客页脚 */ #foot 1 { float : left ; width : 50% } #foot 2 { float : right ; width : 20% } /*=================================================================*\ | Other | \*=================================================================*/ /* Chito中加入的边栏东东 */ /* 列表 */ .navlist { padding : 0 ; margin-left : 20px ; margin-top : 2px ; margin-bottom : 0 ; font-size : 90% ; line-height : 125% ; } /* 搜索框 */ div#chito_search { padding : 0 ; margin-left : 20px ; margin-right : 10px ; } #search_form #s { width : 90% ; margin : 5px 0 5px 0 ; } /* 来访者计数器 */ #count { font-size : 130% ; color : #000000 ; margin-bottom : 5px ; text-align : center ; font-family : Tahoma , Georgia, Serif ; font-weight : bold ; font-style : italic ; } /* Relative Articles Navigator 相关文章 */ .ui-tabs ul{ margin : 5px 0 5px 0 ; list-style-type : circle } .ui-tabs .ui-tabs-nav { margin : 0 ; padding : . 2em . 2em 0 ; font-size : 90% ; } .ui-tabs .ui-tabs-panel { display : block ; border-width : 0 ; padding : 0 ; background : none ; } .ui-widget-header { border : 1px solid #AAAAAA ; background : none ; color : #CCACCA ; font-weight : bold ; line-height : 90% ; } .ui-widget { font-size : 100% ; font-family : "明兰" , "文泉驿微米黑" , "微软雅黑" , Ubuntu, Arial , sans-serif ; line-height : 120% ; } .ui-state- default , .ui-widget-content .ui-state- default , .ui-widget-header .ui-state- default { background : none ; } /* Web Link 链接 */ a:-webkit-any-link { color : #000000 !important ; background : inherit !important ; text-decoration : none !important ; } a:-webkit-any-link:hover { color : #808000 !important ; text-decoration : none !important ; } a:-webkit-any-link:before, a:-webkit-any-link:after { color : #444444 !important ; font-size : inherit !important ; text-shadow : #EEEEEE 0px 0px 20px !important ; FILTER: Shadow(Color= #EEEEEE , Direction= 135 , Strength= 1 ) !important ; } a:-webkit-any-link:not(#more):not(.up):not(.down):before, a:-webkit-any-link:not(#more):not(.up):not(.down):after { content : "∷" !important ; } /* 上面是给webkit用户的 */ a { color : #000000 !important ; background : inherit !important ; text-decoration : none !important ; } a:hover { color : #808000 !important ; text-decoration : none !important ; } a:before, a:after { color : #444444 !important ; font-size : inherit !important ; text-shadow : #EEEEEE 0px 0px 20px !important ; FILTER: Shadow(Color= #EEEEEE , Direction= 135 , Strength= 1 ) !important ; } /* <!--more>和文章导航以外的链接 */ a:not(#more):not(.up):not(.down):before, a:not(#more):not(.up):not(.down):after { content : "∷" !important ; } /* Transitions 变换效果 */ * { transition: color 0.5 s, background 1 s !important ; -webkit-transition: color 0.5 s, background 1 s !important ; -moz-transition: color 0.5 s, background 1 s !important ; -o-transition: color 0.5 s, background 1 s !important ; } |
PostScript
- 別看代碼這麼長,自己用Vim等工具「壓縮」一下就好了。
- 其实上面就是一堆「选择器」了,可到《CSS选择器笔记》或www.w3schools.com了解下。
- 我的置頂導航欄是從這裏定製的:http://cssmenumaker.com/
本網站無註明「轉載」的著作均由Jak Wings製作 CC BY-NC-SA 2.5
Creative Commons 保持署名-相同方式分享 2.5
13 年前
面目全非了啊……
13 年前
-_-; ……总之现在没有边栏了,可以不弄定宽模式了。
5 年前
還標示了每個最後嵌套的回覆是哪個還標示了每個最後嵌套的回覆是哪個
3 年前
Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. which best compares habitat preservation and laws that protect biodiversity
大约 1 年前
SCERT Assam Board Follows NCERT Curriculum These Textbooks are Updated as per the Syllabus Prescribed by Assam Board. Students of 2nd Class Should follow Prescribed Textbooks while Preparing for Exam. Our Team Refer to the Respective Subject Textbook while Preparing the Final Important questions. Students Best Practice Study Materiel about Textbooks are the Fact that they are so Assam 2nd Class Textbook 2024 Comprehensible that it does not require the aid of a Subject Literate.SCERT Assam has Developed the new Textbooks at the Elementary Standard in Prepare by Senior experts. Assam Board once Publishes the Assam 2nd Standard Textbooks 2024