顯示廣告
隱藏 ✕
※ 本文為 dinos 轉寄自 ptt.cc 更新時間: 2013-10-30 01:12:16
看板 Web_Design
作者 davidsky (Alive)
標題 Re: [問題] 新手學DIV如何起手
時間 Wed Oct 30 00:40:55 2013



Div
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div
<div> - HTML | MDN
[圖]
The HTML div element (or HTML Document Division Element) is the generic container for flow content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should  ...
 

Table
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
<table> - HTML | MDN
[圖]
The HTML Table Element (table) represents data in two dimensions or more. ...
 

從Permitted content可以知道div可以放所有flow content
(https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#Flow_content),
Content categories - HTML | MDN
[圖]
Each HTML element must abide by rules defining what kind of content it can have. These rules are grouped into content models common to several elements. Each HTML element belongs to zero, one, or multiple content models, each settings rules that the element's content must follow in a HTML-conformant ...
 
而table裡面只能放既定的元素

你的敘述很亂看不出你想用div做什麼,
基本上他就是很自由的元素, css rule會寫的話他可以變成任何你想模擬的東西.

So learn CSS first!
https://developer.mozilla.org/en-US/docs/Web/CSS
CSS | MDN
[圖]
Cascading Style Sheets, most of the time abbreviated as CSS, is a stylesheet language used to describe the presentation of a document written in HTML ...
 

※ 引述《ernieyang09 (亂入)》之銘言:
: 如題 今年剛從事UI設計
: 但是公司舊系統的網頁很老舊
: 1X年前的PHP 整頁9成PHP 1成JAVASCRIPT
: 主要是用網頁取DB資料做資料呈現 不太在意 所以不是很有設計感
: 最近開發其他系統的網頁就改用JQUERY
: 但是那個系統還太難了 我連看CODE都有問題
: 而最近我要幫公司在舊系統上開發ㄧ頁新功能
: 我去研究了其他很類似的網頁 發現排版就是套table裡面再套table再套.....
: 新的系統用的就是DIV方式 但是那邊CODE真的太難了 兩邊功能又有落差
: 請問各位DIV的學習要如何上手
: 巢狀TABLE真的很直覺
: DIV包一堆都看不太懂XD 尤其是很多DIV裡面只包了一個DIV
: (我是看CODE的學的 問前輩他說是可以做ㄧ些APPEND 但是好像跟本沒用到)
: 不知道巢狀中 哪些用TABLE 哪些用DIV
: 看過置底文 就是除了CSS以外都學習過了 (DB用現成的 create db其實很難)
: DIV苦手求救
: 感謝

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 36.231.61.214

--
※ 看板: dinos 文章推薦值: 0 目前人氣: 0 累積人氣: 144 
guest
x)推文 r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇