從psd文件到html圖文說明教程分享 發表時間:2024-01-01 來源:明輝站整理相關軟件相關文章人氣: [摘要]綱要計劃布局,劃分整體結構內容區域,從整體到局部,局部中的通用部分,根據上下文應用樣式公共頭部(public-header)、尾部(public-footer)公共容器(public-container/inner-center)css文件,html結構,多考慮不要讓內聯元素與塊級元素處于同一級別... 綱要整體結構
page-content header section-feature(可增/刪) section-main section-postscript(可增/刪) footer
公共部分
orpage-content header section-feature(可增/刪) section-name-1 section-name-2 ... footer
公共部分
section-main無邊欄設計section.section-main>.inner-center 左邊欄設計section.section-main>.inner-center
aside.aside-left
main.main>.content 雙邊欄設計section.section-main>.inner-center
aside.aside-left
main.main>.content
aside.aside-right 特定需求代碼規范HTML(fex-team) CSS(fex-team)
命名約定與應用常見class關鍵詞布局類:header, footer, container, main, content, aside, page, section 包裹類:wrap, inner 區塊類:region, block, box 結構類:hd, bd, ft, top, bottom, left, right, middle, col, row, grid, span 列表類:list, item, field 主次類:primary, secondary, sub, minor 大小類:s, m, l, xl, large, small 狀態類:active, current, checked, hover, fail, success, warn, error, on, off 導航類:nav, prev, next, breadcrumb, forward, back, indicator, paging, first, last 交互類:tips, alert, modal, pop, panel, tabs, accordion, slide, --scroll, overlay, 星級類:rate, star 分割類:group, seperate, divider 等分類:full, half, third, quarter 表格類:table, tr, td, cell, row 圖片類:img, thumbnail, original, album, gallery 語言類:cn, en 論壇類:forum, bbs, topic, post 方向類:up, down, left, right 其他語義類:btn, close, ok, cancel, switch; link, title, info, intro, more, icon; form, label, search, contact, phone, date, email, user; view, loading... 圖片命名與圖標命名,index-header-logo,index-footer-logo.
約定規則關鍵詞間以中劃線- 連接 以中劃線連接,如.item-img 使用兩個中劃線表示特殊化,如.item-img.item-img--small表示在.item-img的基礎上特殊化 狀態類直接使用單詞,參考上面的關鍵詞,如.active, .checked 圖標以icon-為前綴(字體圖標采用.icon-font.i-name方式命名)。 模塊采用關鍵詞命名,如.slide, .modal, .tips, .tabs,特殊化采用上面兩個中劃線表示,如.imgslide--full, .modal--pay, .tips--up, .tabs--simple js操作的類統一加上js-前綴 不要超過四個class組合使用,如.a.b.c.d 一個類名,不要超過三個單詞的連接。 主體結構命名前加上該頁的命名,如index-banner,index-main。
實踐應用通過添加前綴修飾關鍵詞 public-header,article-header,index-banner,index-panel 通過層級關系特殊化類,一般子元素接著父元素的最后一個單詞(繼承式) ul.card-list
li.list-item
a.item-img-link>img.item-img
h3.item-tt>a.item-tt-link
p.item-text
<ul>
<li>
<a href="#"><img src="" alt=""></a>
<h3><a href="#"></a></h3>
<p></p>
</li>
</ul>
參考資料什么鬼,又不知道怎么命名class了 HTML整站結構設計 慕課網《從psd到html》
以上就是從psd文件到html教程分享的詳細內容,更多請關注php中文網其它相關文章!
網站建設是一個廣義的術語,涵蓋了許多不同的技能和學科中所使用的生產和維護的網站。 | |