首页 > 传统网站与Web标准——表格布局实例

传统网站与Web标准——表格布局实例

步骤1:

一、效果

二、HTML

Header imageheader image 2 
optional tagline here



三、CSS

/* Global Styles */body {margin:0px;}#logo  {font:14px Arial, Helvetica, sans-serif;color: #FF9900;letter-spacing:.5em;line-height:30px;}#tagline  { font:11px Arial, Helvetica, sans-serif;color: #FF9900;letter-spacing:.2em;line-height:14px;}



四、知识点:

(一) 标签的 nowrap 属性 :

规定表格单元格中的内容不换行,属性行为与很多参考资料提的table、td的width属性无关。

(二)em:

em指字体高,任意浏览器的默认字体高都是16px。所以未经调整的浏览器都符合: 1em=16px。那么12px=0.75em, 10px=0.625em。为了简化font-size的换算,需要在css中的body选择器中声明Font-size=62.5%,这就使em值变为 16px*62.5%=10px, 这样12px=1.2em, 10px=1em, 也就是说只需要将你的原来的px数值除以10,然后换上em作为单位就行了。em有如下特点:

1. em的值并不是固定的;

2. em会继承父级元素的字体大小。

 

五、技术要点:

 1、表格总宽度不固定,具体宽度由第4个单元格100%的设置补充,整个宽度充满屏幕;

2、页边距在样式表中由标签body设置;

3、字体在样式表中由标签#logo、#tagline设置;

4、布局表格属性在网页中设置

5、单元格中插入图片时,单元格的宽度应该由图片宽度决定,两个图片高度应该一致。

步骤2:

一、效果:

二、HTML

  



三、CSS

无对应的样式

四、要点

七条红黄相间的线而已,每行中插入的是一个像素宽高,颜色透明的图片mm_spacer.gif

 

步骤3:

一、效果

二、HTML

  



三、CSS

#navigation td {border-bottom: 1px solid #FF9900}#navigation a {font:11px Arial, Helvetica, sans-serif;color: #FF9900;line-height:16px;letter-spacing:.1em;text-decoration: none;display:block;padding:8px 6px 8px 22px;}
#navigation a:hover {color:#FFFFCC;font-weight:bold;background: url("mm_bullet_yellow.gif") 10px 50% no-repeat;}
.navText {font:11px Georgia, Times New Roman, Times, serif;color: #1F2669;line-height:16px;letter-spacing:.1em;text-decoration: none;}



四、要点:

 1、背景在标签中设置,背景线图片mm_bg_red.gif;

2、navborder、#navheader??

 

步骤4:

一、效果

二、HTML

    



WELCOME MESSAGE

This Home Page layout makes a great starting point for your website. Virtually all of the content is customizable, including the images, the text, and the links. You can decide whether to keep the existing graphics or swap them out for pictures of your own.

The text on this page is intended to help you jumpstart your design by suggesting the sort of content you may want to include, but don't let it limit you. The same is also true for the link text - feel free to change the names of the links to better suit your particular needs. If you have any questions about using Contribute to edit these pages, refer to the Read Me file included with the download or to the Contribute Help System. Have fun and make a great website!



      





三、CSS

.pageName{font:18px Arial, Helvetica, sans-serif;color: #FFFF00;line-height:24px;letter-spacing:.3em;}
.bodyText {font:11px Arial, Helvetica, sans-serif;color:#FFFF00;line-height:22px;margin-top:0px;letter-spacing:.1em;}

 

步骤5:

一、效果

 二、HTML



FEATURED PRODUCTS


product image 1
Lorem ipsum dolor sit amet consetetur.
read more >

product image 2
Lorem ipsum dolor sit amet consetetur.
read more >


 
 



三、CSS

.columnHeader {font: 11px Arial, Helvetica, sans-serif;color: #FF080E;line-height:18px;letter-spacing:.05em;}
.smallText {font:10px Arial, Helvetica, sans-serif;color:#333333;}



 

 

转载于:https://www.cnblogs.com/WestGarden/archive/2012/08/31/3138336.html

更多相关:

  • 蒙特卡洛法和时序差分学习Note 10 蒙特卡洛法和时序差分学习 Monte Carlo and Temporal Difference10.1 蒙特卡洛法和时序差分学习 (Monte Carlo and Temporal Difference)10.2 Q中的TD学习(TD Learning in QQQ )10.3 资格迹(Eli...

  • 强化学习(五) - 时序差分学习(Temporal-Difference Learning)及其实例5.1 TD预测例5.1 回家时间的估计5.2 TD预测方法的优势例5.2 随机移动5.3 TD(0)最优性例5.3:批量更新下的随机行走例5.4: You are the Predictor5.4 Sarsa:策略 TD控制例 5.5...

  • 新建一个login文件,里面存放的就是用户登录的模块。 在body...

  • 练习1:Ecshop  录制登录后退出业务  打开系统  存储页面的标题     a.点击"登录"按钮     b.输入用户名:testing      存储输入的用户名     c.输入密码:123456     d.点击"立即登录"按钮      存储登录成功的提示信息      存储登录成功后页面显示的用户名     e.选择...

  • 需要导入Zxing.jar包import android.graphics.Bitmap;import com.google.zxing.BarcodeFormat; import com.google.zxing.MultiFormatWriter; import com.google.zxing.WriterException;...

  • 下面是我在博客园找到的,和我遇见的情况很相似,所以摘抄下来,原文见:http://www.cnblogs.com/charling/p/3635031.html box-sizing语法:   box-sizing : content-box || border-box || inherit   参数取值:   content-box...

  • 输入格式 输入文件的第 1 行包含两个数 N 和 M,N 表示初始时数列中数的个数,M 表示要进行的操作数目。 第 2 行包含 N 个数字,描述初始时的数列。 以下 M 行,每行一条命令,格式参见问题描述中的表格 输出格式 对于输入数据中的 GET-SUM 和 MAX-SUM 操作,向输出文件依次打印结 果,每个答案(数字)占...

  • 【传送门:BZOJ4491】 简要题意:   给出一个长度为n的序列,m个操作,每个操作输入x,y,求出第x个数到第y个数的最长子串,保证这个最长子串是不上升或不下降子串 题解:   线段树   因为不上升或不下降嘛,就差分一下呗   每一段区间维护:   d表示最多连续的非正数的个数,u表示最多连续的非负数的个数   ld表示左端点...

  • 主体段树,要注意,因为有set和add操作,当慵懒的标志下推。递归优先set,后复发add,每次运行set行动add马克清0 WA了好几次是由于计算那一段的时候出问题了,可笑的是我对着模板找了一个多小时的错。 #include #include #include #include

  • 但是对于表格要注意,在

    和之间还有一个,即使你在构建
    时没有使用这个