如题
打算把布局练得差不多了再仔细的学js,禅意花园的布局还比较简单就照着写了一遍来看看。
需要的话大家可以自己跑跑看,大致的布局我给加了边框线容易理解了。
还有顺便提个问:本来是无序列表的li设置成块元素后没有前面的圆点了,这是为啥?

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><title>garden</title><style>/*基础元素们*/html{margin: 0;padding: 0;}body{font: 75% georgia, sans-serif ;line-height: 1.88889;color: #555753;/*樱花树背景图右下角对齐*/background: #fff url(http://csszengarden.com/001/blossoms.jpg) no-repeat  bottom right;margin: 0;padding: 0;}p{margin-top: 0;text-align: justify;/*justify 实现两端对齐文本效果。*/}h3{font: italic normal 1.4em georgia, sans-serif;letter-spacing: 1px;margin-bottom: 0;color: #7D775C;}a:link{font-weight: bold;text-decoration: none;color: #B7A5DF;}a:visited {font-weight: bold;text-decoration: none;color: #D4CDDC;}a:hover, a:focus, a:active {text-decoration: underline;color: #9685BA;}abbr{border-bottom: none;}/*特殊元素*/.page-wrapper {/*荷塘完全本领背景图左上角对齐*/background: url(http://csszengarden.com/001/zen-bg.jpg) no-repeat top left;padding: 0 175px 0 110px;margin: 0;position: relative;}.intro{min-width: 470px;width: 100%;}header h1 {/*transparent是全透明黑色(black)的速记法,即一个类似rgba(0,0,0,0)这样的值*//*此处把背景设置为透明可以显示被覆盖的元素*/background: transparent url(http://csszengarden.com/001/h1.gif) no-repeat top left;margin-top: 10px;/*块级元素在浏览器显示时,通常会以新行来开始(和结束)。*/display: block;width: 219px;height: 87px;float: left;/*缩进定义百分比是基于父元素宽度*/text-indent: 100%;white-space: nowrap;overflow: hidden;/*缩进100%且不换行再hidden溢出,文本被完全隐藏只剩背景图*/}header h2{background: transparent url(http://csszengarden.com/001/h2.gif) no-repeat top left;margin-top: 58px;margin-bottom: 40px;width: 200px;height: 18px;float: right;text-indent: 100%;white-space: nowrap;overflow: hidden;}header{padding-top: 20px;height: 87px;}.summary{clear: both;margin: 20px 20px  20px 10px;width: 160px;float: left;}.summary p{font: italic 1.1em/2.2 georgia;text-align: center;}.preamble{clear: right;padding: 0px 10px 0 10px;}.support{padding-left: 10px;margin-bottom: 40px;}footer{text-align: center;}footer a:link, footer a:visited {margin-right: 20px;}.side{margin-left: 600px;position: absolute;top: 0;right: 0;}.side .wrapper{font: 10px verdana, sans-serif;background: transparent url(http://csszengarden.com/001/paper-bg.jpg) top left repeat-y;padding: 10px;margin-top: 150px;width: 130px;}.side h3.select{background: transparent url(http://csszengarden.com/001/h3.gif) no-repeat top left;margin: 10px 0 5px 0;width: 97px;height: 16px;text-indent: 100%;white-space: nowrap;overflow: hidden;}.side h3.archives{background: transparent url(http://csszengarden.com/001/h5.gif) no-repeat top left;margin: 25px 0 5px 0;width:57px;height: 14px;text-indent: 100%;white-space: nowrap;overflow: hidden;}.side h3.resource{background: transparent url(http://csszengarden.com/001/h6.gif) no-repeat top left;margin: 25px 0 5px 0;width:63px;height: 10px;text-indent: 100%;white-space: nowrap;overflow: hidden;}.side ul{margin: 0;padding: 0;}.side li{line-height: 1.3em;/*侧边栏的分隔横线*/background: transparent url(http://csszengarden.com/001/cr1.gif) no-repeat top center;/*不懂就问:这里本来是无序列表的li设置成块元素后没有前面的圆点了*/display: block;padding-top: 5px;margin-bottom: 5px;list-style-type: none;}.side li a:link{color: #988F5E;}.side li a:visited {color: #B3AE94;}.extra1{background: transparent url(http://csszengarden.com/001/cr2.gif) top left no-repeat;position: absolute;top: 40px;right: 0;width: 148px;height: 110px;}/*布局边框线*/div{border: 2px dashed #ed462c;margin: 5px}header, h1, h2, h3, .summary, footer{border: 1px solid #A29EA3;}</style></head><body><!--页面包--><div class="page-wrapper"><!--前面的标题及概述部分--><section class="intro" id="intro"><!--标题--><header><h1>CSS Zen Garden</h1><h2>The Beauty of <abbr title="Cascading Style Sheets">CSS</abbr> Design</h2></header><!--概括--><div class="summary" id="summary"><p>A demonstration of what can be accomplished through <abbr title="Cascading Style Sheets">CSS</abbr>-based design. Select any style sheet from the list to load it into this page.</p><p>Download the example <a href="/examples/index" title="This page's source HTML code, not to be modified.">html file</a> and <a href="/examples/style.css" title="This page's sample CSS, the file you may modify.">css file</a></p></div><!--序言--><div class="preamble"><h3>The Road to Enlightenment</h3><p>Littering a dark and dreary road lay the past relics of browser-specific tags, incompatible <abbr title="Document Object Model">DOM</abbr>s, broken <abbr title="Cascading Style Sheets">CSS</abbr> support, and abandoned browsers.</p><p>We must clear the mind of the past. Web enlightenment has been achieved thanks to the tireless efforts of folk like the <abbr title="World Wide Web Consortium">W3C</abbr>, <abbr title="Web Standards Project">WaSP</abbr>, and the major browser creators.</p><p>The CSS Zen Garden invites you to relax and meditate on the important lessons of the masters. Begin to see with clarity. Learn to use the time-honored techniques in new and invigorating fashion. Become one with the web.</p></div></section><!--文章的主体部分,每个单独的章节用div分块--><div class="mian support"><div class="explan"><h3>So What is This About?</h3><p>There is a continuing need to show the power of <abbr title="Cascading Style Sheets">CSS</abbr>. The Zen Garden aims to excite, inspire, and encourage participation. To begin, view some of the existing designs in the list. Clicking on any one will load the style sheet into this very page. The <abbr title="HyperText Markup Language">HTML</abbr> remains the same, the only thing that has changed is the external <abbr title="Cascading Style Sheets">CSS</abbr> file. Yes, really.</p><p><abbr title="Cascading Style Sheets">CSS</abbr> allows complete and total control over the style of a hypertext document. The only way this can be illustrated in a way that gets people excited is by demonstrating what it can truly be, once the reins are placed in the hands of those able to create beauty from structure. Designers and coders alike have contributed to the beauty of the web; we can always push it further.</p></div><div class="participation"><h3>Participation</h3><p>Strong visual design has always been our focus. You are modifying this page, so strong <abbr title="Cascading Style Sheets">CSS</abbr> skills are necessary too, but the example files are commented well enough that even <abbr title="Cascading Style Sheets">CSS</abbr> novices can use them as starting points. Please see the <a href="http://www.mezzoblue.com/zengarden/resources/" title="A listing of CSS-related resources"><abbr title="Cascading Style Sheets">CSS</abbr> Resource Guide</a> for advanced tutorials and tips on working with <abbr title="Cascading Style Sheets">CSS</abbr>.</p><p>You may modify the style sheet in any way you wish, but not the <abbr title="HyperText Markup Language">HTML</abbr>. This may seem daunting at first if you&#8217;ve never worked this way before, but follow the listed links to learn more, and use the sample files as a guide.</p><p>Download the sample <a href="/examples/index" title="This page's source HTML code, not to be modified.">HTML</a> and <a href="/examples/style.css" title="This page's sample CSS, the file you may modify.">CSS</a> to work on a copy locally. Once you have completed your masterpiece (and please, don&#8217;t submit half-finished work) upload your <abbr title="Cascading Style Sheets">CSS</abbr> file to a web server under your control. <a href="http://www.mezzoblue.com/zengarden/submit/" title="Use the contact form to send us your CSS file">Send us a link</a> to an archive of that file and all associated assets, and if we choose to use it we will download it and place it on our server.</p></div><div class="benefits"><h3>Benefits</h3><p>Why participate? For recognition, inspiration, and a resource we can all refer to showing people how amazing <abbr title="Cascading Style Sheets">CSS</abbr> really can be. This site serves as equal parts inspiration for those working on the web today, learning tool for those who will be tomorrow, and gallery of future techniques we can all look forward to.</p></div><div class="requirements"><h3>Requirements</h3><p>Where possible, we would like to see mostly <abbr title="Cascading Style Sheets, levels 1 and 2">CSS 1 &amp; 2</abbr> usage. <abbr title="Cascading Style Sheets, levels 3 and 4">CSS 3 &amp; 4</abbr> should be limited to widely-supported elements only, or strong fallbacks should be provided. The CSS Zen Garden is about functional, practical <abbr title="Cascading Style Sheets">CSS</abbr> and not the latest bleeding-edge tricks viewable by 2% of the browsing public. The only real requirement we have is that your <abbr title="Cascading Style Sheets">CSS</abbr> validates.</p><p>Luckily, designing this way shows how well various browsers have implemented <abbr title="Cascading Style Sheets">CSS</abbr> by now. When sticking to the guidelines you should see fairly consistent results across most modern browsers. Due to the sheer number of user agents on the web these days &#8212; especially when you factor in mobile &#8212; pixel-perfect layouts may not be possible across every platform. That&#8217;s okay, but do test in as many as you can. Your design should work in at least IE9+ and the latest Chrome, Firefox, iOS and Android browsers (run by over 90% of the population).</p><p>We ask that you submit original artwork. Please respect copyright laws. Please keep objectionable material to a minimum, and try to incorporate unique and interesting visual themes to your work. We&#8217;re well past the point of needing another garden-related design.</p><p>This is a learning exercise as well as a demonstration. You retain full copyright on your graphics (with limited exceptions, see <a href="http://www.mezzoblue.com/zengarden/submit/guidelines/">submission guidelines</a>), but we ask you release your <abbr title="Cascading Style Sheets">CSS</abbr> under a Creative Commons license identical to the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="View the Zen Garden's license information.">one on this site</a> so that others may learn from your work.</p><p role="contentinfo">By <a href="http://www.mezzoblue.com/">Dave Shea</a>. Bandwidth graciously donated by <a href="http://www.mediatemple.net/">mediatemple</a>. Now available: <a href="http://www.amazon.com/exec/obidos/ASIN/0321303474/mezzoblue-20/">Zen Garden, the book</a>.</p></div><!--脚注链接被包括在主要部分内--><footer><a href="#">HTML</a><a href="#">CSS</a><a href="#">CC</a><a href="#">A11y</a><a href="#">GH</a></footer></div><!--整个侧边栏用一个aside包裹div统一背景及基础属性,再分成数个div分开描述--><aside class="side"><div class="wrapper"><!--设计者列表--><div class="design-selection"><h3 class="select">Select a Design:</h3><nav><ul><li><a href="#" class="name">Alfred</a>  by  <a href="#">Arthur</a></li><li><a href="#" class="name">Alfred</a>  by  <a href="#">Arthur</a></li><li><a href="#" class="name">Alfred</a>  by  <a href="#">Arthur</a></li><li><a href="#" class="name">Alfred</a>  by  <a href="#">Arthur</a></li><li><a href="#" class="name">Alfred</a>  by  <a href="#">Arthur</a></li><li><a href="#" class="name">Alfred</a>  by  <a href="#">Arthur</a></li><li><a href="#" class="name">Alfred</a>  by  <a href="#">Arthur</a></li><li><a href="#" class="name">Alfred</a>  by  <a href="#">Arthur</a></li></ul></nav></div><!--归档--><div class="design-archives"><h3 class="archives">Archives:</h3><nav><ul><li><a href="#">Next Designs <span class="indicator">&rsaquo;</span></a></li><li><a href="#">View All Designs </a></li></ul></nav></div><div class="resources"><h3 class="resource">Resources:</h3><ul><!--&#8217;转义字符单引号--><li><a href="#">View This Design&#8217;s </a></li><li><a href="#">Resources </a></li><li><a href="#">FAQ </a></li><li><a href="#">Submit a Design </a></li><li><a href="#">Translations </a></li></ul></div></div></aside></div><!--页面包的脚。--><!--自由发挥的部分--鸟居装饰图--><div class="extra1"></div></body>
</html>

CSS禅意花园初始页面布局分析相关推荐

  1. css前端知识分享—页面布局分析

    今天分享下"css前端知识分享-页面布局分析"这篇文章,文中根据实例编码详细介绍,或许对大家的编程之路有着一定的参考空间与使用价值,需要的朋友接下来跟着云南仟龙Mark一起学习一下 ...

  2. 读书笔记:CSS禅意花园-布局法则

     设计的目标:      好的作品是能够唤起某种气氛和情感,引起欣赏者的共鸣,而 正如CSS禅意花园的名字所言,应该把握它的四点设计精髓- 视觉.CSS.禅.花园 ,真正优秀的设计应该给人平静.放松如 ...

  3. 《CSS 禅意花园》读书笔记1

    最近有点忙..但有的事情开始写博客就不能停下来. <<CSS 禅意花园>>读书笔记1(基础篇---------上) 在假期中买一本<<CSS 禅意花园>> ...

  4. 读《CSS禅意花园》 有感

    读<CSS禅意花园> 有感 1.图片用<img>标签添加到页面中,会增加页面的大小,导致页面加载需要更长的时间.可以用css background 引用图片. 1.1.若图像属 ...

  5. CSS大道至简--读《CSS禅意花园》

    CSS大道至简 只承认一个个确实存在的东西,凡干扰这一具体存在的空洞的普遍性概念都是无用的累赘和废话,应当一律取消.如无必要,勿增实体. ---奥卡姆剃刀 周末找了两个主题研究了一下:CSS 正则表达 ...

  6. CSS禅意花园——CSS设计的绝美境界

    CSS禅意花园,早有耳闻,一直没太注意,原来,这是个世界上都非常著名的网站,这个网站,主页只有一个,样式表却有成百上千个,选择不同的样式表,装载到这个页面,就会为我们呈现成百.上千种不同的视觉效果. ...

  7. 读《CSS禅意花园》中学习到的

    昨晚看完了网上名气很大的<CSS禅意花园>,其实整本书的内容都只是从web设计人员的角度出发,这本书对于网页制作人员而言,可以这么形容它的价值:饭后小甜点.     这是一本小品式的书.一 ...

  8. CSS禅意花园标准HTML

    <!DOCTYPE html> <html><head><meta http-equiv="Content-Type" content=& ...

  9. CSS+DIV进行的页面布局

    CSS+DIV进行的页面布局 第一部分.布局概述 1.网页布局 2.页面元素定位机制 第二部分.布局常用属性 1.浮动属性(float) 2.清除浮动(clear) 3.定位属性(position) ...

  10. 基于制表位停止检测的页面布局分析方法_TesseractOCR内置

    基于制表位的混合页面版面分析技术: 摘要:提出了一种新的混合页面布局分析算法,该算法使用自底向上的方法形成初始数据类型假设,并定位页面格式化时使用的制表符.检测到的制表符停止符用于推断页面的列布局.然 ...

最新文章

  1. C++继承与派生(原理归纳)
  2. Android 进程常驻(0)----MarsDaemon使用说明
  3. Eclipse Git 克隆项目的时候出现Internal error; consult Eclipse error log
  4. 穿透内网,连接动态ip,内网ip打洞-----p2p实现原理(转)
  5. windows7系统屏幕一直闪屏的解决教程
  6. python java混合编程_详解java调用python的几种用法(看这篇就够了)
  7. linux下ip协议(V4)的实现(一)
  8. 存储过程/函数权限的问题解决(The user specified as a definer ('root'@'%') does not exist)...
  9. MySQL高级知识(三)——索引
  10. leetcode python3 简单题110. Balanced Binary Tree
  11. ANDROID常用的命令(转载,后续自己完善)
  12. JS 在 HTML 中做加减乘除
  13. Cloudflare的介绍可以防DDOS 能防多少G呢?
  14. 图形推理1000题pdf_这7道幼儿园数学思维题,能答对一半智商肯定不低
  15. Shashlik Cooking(思维)
  16. 今天是愚人节。(Today is April Fools' Day.)网页需要倾斜o(∩_∩)o
  17. 创新认知 基于LPC1114单片机的传感器使用
  18. nextdate函数 c语言,NextDate函数包含3个变量month,day和year,函数的输出为输入日期后一天日期.要求month,day和year满足下列...
  19. 迁移学习对医疗图像的影响(Transfusion: Understanding Transfer Learning for Medical Imaging)
  20. 快速掌握Charles抓包工具 [MP4] (115M)

热门文章

  1. 使用RMAN备份与恢复数据库(1)——RMAN基本命令
  2. Dubbo使用_尚硅谷视频学习笔记
  3. Dr.com哆点客户端本地密码查看
  4. VGG-16网络结构详解
  5. matlab均值滤波代码6,均值滤波matlab程序代码
  6. 软设考点精要,精确到每页!
  7. matlab得到小波参数,MATLAB|高频信号的小波分析技术要点
  8. 宏基因组 微生物组 微生物生态领域杂志简介及最新影响因子
  9. 设计模式(三)之生成器模式(Builder Pattern)
  10. MATLAB 人脸识别矩阵(矩阵、相似度)