SlideShare a Scribd company logo
1 of 27
从  <TABLE>  到  <DIV> 搜狐总编室 CSS+DIV 网页技术入门培训 这注定是一次  [ 极其无聊 ]  但是  [ 对于工作很有帮助 ]  的培训 ……
 
为什么转向 <DIV> ? 搜狐总编室 CSS 入门培训
<TABLE> 的概念 <tr> </tr> <tr> </tr> <tr> </tr> <td> </td> <td> </td> <td> </td> <table> </table>
<DIV> 的概念 <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div>
所以说: 小结 1:  <DIV> 相比于 <TABLE> ,除了概念完全不同, 也更灵活,可以实现更强大的网页排版功能! ( 而且,我公司最彪悍的部门—— CMS—— 都开始强力推广了哦! )
HTML 基本结构 搜狐总编室 CSS 入门培训
页面基本结构 <html> <head> ... </head> <body> ... </body> </html> 页面头部 ( 不可见 ) 页面本体  ( 可见 )
<head> 区域内容 <head> <meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=GBK&quot; /> <meta name=&quot;description&quot; content=&quot; 搜狐文化频道 ,&quot; /> <meta name=&quot;keywords&quot; content=&quot; 文化 , 文化频道 ,...&quot; /> <meta name=&quot;robots&quot; content=&quot;all&quot; /> <title> 文化频道 - 搜狐 </title> <link href=&quot;http://cul.sohu.com/.../global.css&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot;> <style> … </style> </head> 页面标题 ( 浏览器显示 ) 元记录 ( 面向机器 ) CSS 样式表 ( 本次重点 )
<body> 区域内容 <body> <table><tr><td>…</td></tr></table> <div class=“ 爷爷辈” > <div class=“ 儿子辈” > <div class=“ 孙子辈” > … </div> </div> </div> </body> DIV 的层次  ( 本次重点 )
<head> 控制着 <body> <head> <style> .class_one {width: 220px; height: 440px; background: #666} #id_one {width: 440px; height: 220px; background: #999} </style> </head> <body> <div class=“class_one”> 真是一次 </div> <div id=“id_one”> 幸福的培训啊! </div> </body>
所以说: 小结 2:  <DIV> 相比于 <TABLE> ,可以将样式和具体内容分离, 有利于部门和成员之间进行有效的分工,也提高个人的效率!
CSS 样式  ( 这是最重要的部分! ) 搜狐总编室 CSS 入门培训
长和宽 <div></div> width height width: 30px;  ( 像素控制 ) width: 90%;  ( 百分比控制 )
背景 / 边框 background: #FFCC00 url(http://.../123.gif)  top  left  repeat-x; 背景图片 URL 横竖定位 top/bottom; left/right/ center. 重复 repeat-x / repeat-y / no-repeat. 背景颜色 border:  1px  solid  #333333; 像素 边框样式 值: solid ( 实线 ) / dotted ( 虚线 ) 颜色
字体 / 段落 font-weight: bold;  ( 字体粗细;值: bold / normal) font-size: 12px;  ( 字号, px= 像素;搜狐使用 12px 和 14px 两种字号 ) line-height: 150%;  ( 行距;通常使用 150% ,也可以直接填像素值 ) text-align: left;  ( 文字对齐;值: left / right / center)
边距设置 字从这里开始写 width height padding margin padding: 10px;  ( 四周 ) padding: 10px 15px;  ( 上下,左右 ) padding: 10px 15px 20px 25px;  ( 上,右,下,左) 注:  margin: 0 auto;  ( 居中 )
漂移  (* 居左 / 居右 ) float: left float: right float: left float: right float: left float: right float: left
溢出隐藏 <div> (width: 100px) img (width: 200px) 加上  overflow: hidden  前 <div> (width: 100px) img (width: 200px) 加上  overflow: hidden  后
所以说: 小结 3:  <DIV> 相比于 <TABLE> ,真是 newbility !
具体应用案例 搜狐总编室 CSS 入门培训
一个很简单的例子 http://book.sohu.com/frag/219718583/94595_219718583.inc
搜狐 CMS /  统一 DIV 模板 http://cms4.sohu.com/ ,[object Object],[object Object],[object Object]
所以说: 小结 4:   当然,要成为一个熟练工,还是需要多参与实践!!
实用小软件 搜狐总编室 CSS 入门培训
EditPlus3 新建文件  >  将代码拷入编辑区  >  菜单:文档 (D) >  文件类型 >  更改文件类型  > HTML
 

More Related Content

Viewers also liked

Geekier Analytics for SaaS data
Geekier Analytics for SaaS dataGeekier Analytics for SaaS data
Geekier Analytics for SaaS dataProgress
 
A Crash Course in Rapid Application Development
A Crash Course in Rapid Application DevelopmentA Crash Course in Rapid Application Development
A Crash Course in Rapid Application DevelopmentProgress
 
Medeleini Esitlus
Medeleini EsitlusMedeleini Esitlus
Medeleini Esitlusandresta
 
Primera jornada Curs Lectura NT
Primera jornada Curs Lectura NTPrimera jornada Curs Lectura NT
Primera jornada Curs Lectura NTlector
 
Rollbase Mobile Tech Tips
Rollbase Mobile Tech TipsRollbase Mobile Tech Tips
Rollbase Mobile Tech TipsProgress
 
Keywords Marzo Abril2007
Keywords Marzo Abril2007Keywords Marzo Abril2007
Keywords Marzo Abril2007guest0b2315
 
Beijing to Burketown by Jane Hardy
Beijing to Burketown by Jane HardyBeijing to Burketown by Jane Hardy
Beijing to Burketown by Jane Hardybryceives
 
Top 10 innovative IoT connected devices
Top 10 innovative IoT connected devicesTop 10 innovative IoT connected devices
Top 10 innovative IoT connected devicesProgress
 
Yahoo媒体化运作分析
Yahoo媒体化运作分析Yahoo媒体化运作分析
Yahoo媒体化运作分析Steven Lin
 
Malaysia
MalaysiaMalaysia
Malaysiainge44
 
Beijing to Burketown by Jane Hardy
Beijing to Burketown by Jane HardyBeijing to Burketown by Jane Hardy
Beijing to Burketown by Jane Hardybryceives
 
3 Ways to Simplify your Mobile Apps
3 Ways to Simplify your Mobile Apps3 Ways to Simplify your Mobile Apps
3 Ways to Simplify your Mobile AppsProgress
 
Minds That Matter
Minds That MatterMinds That Matter
Minds That Matterxaquelina
 

Viewers also liked (20)

Geekier Analytics for SaaS data
Geekier Analytics for SaaS dataGeekier Analytics for SaaS data
Geekier Analytics for SaaS data
 
Chemrev4
Chemrev4Chemrev4
Chemrev4
 
C He Mreview
C He MreviewC He Mreview
C He Mreview
 
Esitlus
EsitlusEsitlus
Esitlus
 
A Crash Course in Rapid Application Development
A Crash Course in Rapid Application DevelopmentA Crash Course in Rapid Application Development
A Crash Course in Rapid Application Development
 
Medeleini Esitlus
Medeleini EsitlusMedeleini Esitlus
Medeleini Esitlus
 
Primera jornada Curs Lectura NT
Primera jornada Curs Lectura NTPrimera jornada Curs Lectura NT
Primera jornada Curs Lectura NT
 
Rollbase Mobile Tech Tips
Rollbase Mobile Tech TipsRollbase Mobile Tech Tips
Rollbase Mobile Tech Tips
 
Keywords Marzo Abril2007
Keywords Marzo Abril2007Keywords Marzo Abril2007
Keywords Marzo Abril2007
 
Beijing to Burketown by Jane Hardy
Beijing to Burketown by Jane HardyBeijing to Burketown by Jane Hardy
Beijing to Burketown by Jane Hardy
 
Top 10 innovative IoT connected devices
Top 10 innovative IoT connected devicesTop 10 innovative IoT connected devices
Top 10 innovative IoT connected devices
 
Quantum Pres
Quantum PresQuantum Pres
Quantum Pres
 
Yahoo媒体化运作分析
Yahoo媒体化运作分析Yahoo媒体化运作分析
Yahoo媒体化运作分析
 
Malaysia
MalaysiaMalaysia
Malaysia
 
Beijing to Burketown by Jane Hardy
Beijing to Burketown by Jane HardyBeijing to Burketown by Jane Hardy
Beijing to Burketown by Jane Hardy
 
Binayak
BinayakBinayak
Binayak
 
3 Ways to Simplify your Mobile Apps
3 Ways to Simplify your Mobile Apps3 Ways to Simplify your Mobile Apps
3 Ways to Simplify your Mobile Apps
 
Amakusa Rick
Amakusa RickAmakusa Rick
Amakusa Rick
 
Econfig Pres
Econfig PresEconfig Pres
Econfig Pres
 
Minds That Matter
Minds That MatterMinds That Matter
Minds That Matter
 

Similar to 读书文化Div入门培训

程式人雜誌 -- 2014 年9月號
程式人雜誌 -- 2014 年9月號程式人雜誌 -- 2014 年9月號
程式人雜誌 -- 2014 年9月號鍾誠 陳鍾誠
 
Xaml Tutorial By Allan
Xaml Tutorial By AllanXaml Tutorial By Allan
Xaml Tutorial By AllanCat Chen
 
网页设计及制作(Div+css)
网页设计及制作(Div+css)网页设计及制作(Div+css)
网页设计及制作(Div+css)lrk3
 
Div+Css布局入门教程
Div+Css布局入门教程Div+Css布局入门教程
Div+Css布局入门教程yiditushe
 
Cms and Html
Cms and HtmlCms and Html
Cms and Htmlzaiyou
 
Cms and HTML
Cms and HTMLCms and HTML
Cms and HTMLzaiyou
 
揭秘Html5和Css3
揭秘Html5和Css3揭秘Html5和Css3
揭秘Html5和Css3Adam Lu
 
揭秘Html5和Css3 ---- 鲁超伍
揭秘Html5和Css3 ---- 鲁超伍揭秘Html5和Css3 ---- 鲁超伍
揭秘Html5和Css3 ---- 鲁超伍裕波 周
 
Html5css3 go.yeefe.com
Html5css3 go.yeefe.comHtml5css3 go.yeefe.com
Html5css3 go.yeefe.comtellyeefe
 
Chicago EXPO Creating a Pure CSS Template in Joomla 1.5
Chicago EXPO Creating a Pure CSS Template in Joomla 1.5Chicago EXPO Creating a Pure CSS Template in Joomla 1.5
Chicago EXPO Creating a Pure CSS Template in Joomla 1.5compassdesign
 
Denver CMS Expo Creating CSS template
Denver CMS Expo Creating CSS templateDenver CMS Expo Creating CSS template
Denver CMS Expo Creating CSS templatecompassdesign
 
Creating CSS Template with Barrie North
Creating CSS Template with Barrie NorthCreating CSS Template with Barrie North
Creating CSS Template with Barrie NorthJohn Coonen
 
十步学会用Css+Div建站
十步学会用Css+Div建站十步学会用Css+Div建站
十步学会用Css+Div建站yiditushe
 
#成效特訓營 中小企業行動網站必備基礎
#成效特訓營 中小企業行動網站必備基礎#成效特訓營 中小企業行動網站必備基礎
#成效特訓營 中小企業行動網站必備基礎AdWordsGreaterChina
 

Similar to 读书文化Div入门培训 (20)

程式人雜誌 -- 2014 年9月號
程式人雜誌 -- 2014 年9月號程式人雜誌 -- 2014 年9月號
程式人雜誌 -- 2014 年9月號
 
CSS 菜鳥救星
CSS 菜鳥救星CSS 菜鳥救星
CSS 菜鳥救星
 
Xaml Tutorial By Allan
Xaml Tutorial By AllanXaml Tutorial By Allan
Xaml Tutorial By Allan
 
网页设计及制作(Div+css)
网页设计及制作(Div+css)网页设计及制作(Div+css)
网页设计及制作(Div+css)
 
Div+Css布局入门教程
Div+Css布局入门教程Div+Css布局入门教程
Div+Css布局入门教程
 
Cms and Html
Cms and HtmlCms and Html
Cms and Html
 
Cms and HTML
Cms and HTMLCms and HTML
Cms and HTML
 
揭秘Html5和Css3
揭秘Html5和Css3揭秘Html5和Css3
揭秘Html5和Css3
 
揭秘Html5和Css3 ---- 鲁超伍
揭秘Html5和Css3 ---- 鲁超伍揭秘Html5和Css3 ---- 鲁超伍
揭秘Html5和Css3 ---- 鲁超伍
 
Html5css3 go.yeefe.com
Html5css3 go.yeefe.comHtml5css3 go.yeefe.com
Html5css3 go.yeefe.com
 
日新培训
日新培训日新培训
日新培训
 
Chicago EXPO Creating a Pure CSS Template in Joomla 1.5
Chicago EXPO Creating a Pure CSS Template in Joomla 1.5Chicago EXPO Creating a Pure CSS Template in Joomla 1.5
Chicago EXPO Creating a Pure CSS Template in Joomla 1.5
 
Denver CMS Expo Creating CSS template
Denver CMS Expo Creating CSS templateDenver CMS Expo Creating CSS template
Denver CMS Expo Creating CSS template
 
Creating CSS Template with Barrie North
Creating CSS Template with Barrie NorthCreating CSS Template with Barrie North
Creating CSS Template with Barrie North
 
复习
复习复习
复习
 
Less is more
Less is moreLess is more
Less is more
 
Less is more!?
Less is more!?Less is more!?
Less is more!?
 
十步学会用Css+Div建站
十步学会用Css+Div建站十步学会用Css+Div建站
十步学会用Css+Div建站
 
#成效特訓營 中小企業行動網站必備基礎
#成效特訓營 中小企業行動網站必備基礎#成效特訓營 中小企業行動網站必備基礎
#成效特訓營 中小企業行動網站必備基礎
 
第一个课程
 第一个课程 第一个课程
第一个课程
 

读书文化Div入门培训

  • 1. 从 <TABLE> 到 <DIV> 搜狐总编室 CSS+DIV 网页技术入门培训 这注定是一次 [ 极其无聊 ] 但是 [ 对于工作很有帮助 ] 的培训 ……
  • 2.  
  • 3. 为什么转向 <DIV> ? 搜狐总编室 CSS 入门培训
  • 4. <TABLE> 的概念 <tr> </tr> <tr> </tr> <tr> </tr> <td> </td> <td> </td> <td> </td> <table> </table>
  • 5. <DIV> 的概念 <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div> <div> </div>
  • 6. 所以说: 小结 1: <DIV> 相比于 <TABLE> ,除了概念完全不同, 也更灵活,可以实现更强大的网页排版功能! ( 而且,我公司最彪悍的部门—— CMS—— 都开始强力推广了哦! )
  • 8. 页面基本结构 <html> <head> ... </head> <body> ... </body> </html> 页面头部 ( 不可见 ) 页面本体 ( 可见 )
  • 9. <head> 区域内容 <head> <meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=GBK&quot; /> <meta name=&quot;description&quot; content=&quot; 搜狐文化频道 ,&quot; /> <meta name=&quot;keywords&quot; content=&quot; 文化 , 文化频道 ,...&quot; /> <meta name=&quot;robots&quot; content=&quot;all&quot; /> <title> 文化频道 - 搜狐 </title> <link href=&quot;http://cul.sohu.com/.../global.css&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot;> <style> … </style> </head> 页面标题 ( 浏览器显示 ) 元记录 ( 面向机器 ) CSS 样式表 ( 本次重点 )
  • 10. <body> 区域内容 <body> <table><tr><td>…</td></tr></table> <div class=“ 爷爷辈” > <div class=“ 儿子辈” > <div class=“ 孙子辈” > … </div> </div> </div> </body> DIV 的层次 ( 本次重点 )
  • 11. <head> 控制着 <body> <head> <style> .class_one {width: 220px; height: 440px; background: #666} #id_one {width: 440px; height: 220px; background: #999} </style> </head> <body> <div class=“class_one”> 真是一次 </div> <div id=“id_one”> 幸福的培训啊! </div> </body>
  • 12. 所以说: 小结 2: <DIV> 相比于 <TABLE> ,可以将样式和具体内容分离, 有利于部门和成员之间进行有效的分工,也提高个人的效率!
  • 13. CSS 样式 ( 这是最重要的部分! ) 搜狐总编室 CSS 入门培训
  • 14. 长和宽 <div></div> width height width: 30px; ( 像素控制 ) width: 90%; ( 百分比控制 )
  • 15. 背景 / 边框 background: #FFCC00 url(http://.../123.gif) top left repeat-x; 背景图片 URL 横竖定位 top/bottom; left/right/ center. 重复 repeat-x / repeat-y / no-repeat. 背景颜色 border: 1px solid #333333; 像素 边框样式 值: solid ( 实线 ) / dotted ( 虚线 ) 颜色
  • 16. 字体 / 段落 font-weight: bold; ( 字体粗细;值: bold / normal) font-size: 12px; ( 字号, px= 像素;搜狐使用 12px 和 14px 两种字号 ) line-height: 150%; ( 行距;通常使用 150% ,也可以直接填像素值 ) text-align: left; ( 文字对齐;值: left / right / center)
  • 17. 边距设置 字从这里开始写 width height padding margin padding: 10px; ( 四周 ) padding: 10px 15px; ( 上下,左右 ) padding: 10px 15px 20px 25px; ( 上,右,下,左) 注: margin: 0 auto; ( 居中 )
  • 18. 漂移 (* 居左 / 居右 ) float: left float: right float: left float: right float: left float: right float: left
  • 19. 溢出隐藏 <div> (width: 100px) img (width: 200px) 加上 overflow: hidden 前 <div> (width: 100px) img (width: 200px) 加上 overflow: hidden 后
  • 20. 所以说: 小结 3: <DIV> 相比于 <TABLE> ,真是 newbility !
  • 23.
  • 24. 所以说: 小结 4: 当然,要成为一个熟练工,还是需要多参与实践!!
  • 26. EditPlus3 新建文件 > 将代码拷入编辑区 > 菜单:文档 (D) > 文件类型 > 更改文件类型 > HTML
  • 27.