简单明了的网站结构设计呦!
網(wǎng)站結(jié)構(gòu)設(shè)計是網(wǎng)站設(shè)計的重要組成部分。
首先我們要設(shè)計首頁:
首頁主要分為四個部分:
1.網(wǎng)頁標題部分
2.網(wǎng)頁側(cè)邊欄
3.博客中文章摘要組成的文章列表
4.頁面底部的版權(quán)信息顯示部分
構(gòu)建網(wǎng)頁標題
輸入:
<!DOCTYPE html > <html><head><title>文章</title><meta charset="UTF-8"></head></html>執(zhí)行后為:
網(wǎng)頁側(cè)邊欄
要設(shè)計要使用側(cè)欄菜單,添加一個父元素,一個中間內(nèi)容 <ion-
side-menu-content>,和一個或更多 指令。
<ion-side-menus><!-- 中間內(nèi)容 --><ion-side-menu-content ng-controller="ContentController"></ion-side-menu-content><!-- 左側(cè)菜單 --><ion-side-menu side="left"></ion-side-menu><!-- 右側(cè)菜單 --><ion-side-menu side="right"></ion-side-menu> </ion-side-menus> function ContentController($scope, $ionicSideMenuDelegate) {$scope.toggleLeft = function() {$ionicSideMenuDelegate.toggleLeft();}; }博客中文章摘要組成的文章列表
為獲取摘要,有必要先將HTML標簽都剔除掉,在純凈的文字基礎(chǔ)上去截取前
面300字符(Java String的substring()方法即可)。存儲的話就是同樣設(shè)立一個
摘要的目錄,采取數(shù)據(jù)庫本地讀寫的形式。文章實體類多加一個摘要字段,存
放摘要路徑。之后主頁顯示的是Article實體類的摘要字段即可。查看文章內(nèi)容
則顯示Article實體類的文章內(nèi)容字段.
下面是除去HTML標簽的公共方法(借鑒網(wǎng)上):
/** clean all the tags of HTML*/public static String removeTag(String htmlStr) {String regEx_script = "<script[^>]*?>[\\s\\S]*?<\\/script>"; // scriptString regEx_style = "<style[^>]*?>[\\s\\S]*?<\\/style>"; // styleString regEx_html = "<[^>]+>"; // HTML tagString regEx_space = "\\s+|\t|\r|\n";// other charactersPattern p_script = Pattern.compile(regEx_script,Pattern.CASE_INSENSITIVE);Matcher m_script = p_script.matcher(htmlStr);htmlStr = m_script.replaceAll("");Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE);Matcher m_style = p_style.matcher(htmlStr);htmlStr = m_style.replaceAll("");Pattern p_html = Pattern.compile(regEx_html, Pattern.CASE_INSENSITIVE);Matcher m_html = p_html.matcher(htmlStr);htmlStr = m_html.replaceAll("");Pattern p_space = Pattern.compile(regEx_space, Pattern.CASE_INSENSITIVE);Matcher m_space = p_space.matcher(htmlStr);htmlStr = m_space.replaceAll(" ");return htmlStr;}頁面底部的版權(quán)信息顯示部分
參見下面幾個正確的格式:
?1995-2004 Macromedia, Inc. All rights reserved.
?2004 Microsoft Corporation. All rights reserved.
Copyright ? 2004 Adobe Systems Incorporated. All rights reserved.
?1995-2004 Eric A. and Kathryn S. Meyer. All Rights Reserved.
請注意標點符號和大小寫的用法
設(shè)計詳細頁
詳細頁分為四個部分:
1.頁面頭部
2.側(cè)面
3.詳情內(nèi)容
4.頁面尾部
在做詳細頁的時候,需要一個正確的思維方式,一個清晰的思路設(shè)計
在做詳細頁的時候我們要注意:
1.布局
2.標題
3.主圖
4.絕對詞
網(wǎng)站結(jié)構(gòu)設(shè)計的目標:
1.層次清楚,突出主題
理清網(wǎng)頁內(nèi)容及欄目結(jié)構(gòu)的脈絡(luò),使鏈接結(jié)構(gòu)、導航線路層次清晰;內(nèi)容與結(jié)
構(gòu)要突出主題。
2.體現(xiàn)特征,注重特色設(shè)計
3.方便用戶使用
4.網(wǎng)頁在功能分配上合理,且要功能強大
5.可擴展性能好
6.網(wǎng)頁設(shè)計與結(jié)構(gòu)在用戶體驗上的完美結(jié)合
7.面向搜索引擎的優(yōu)化
總結(jié)
以上是生活随笔為你收集整理的简单明了的网站结构设计呦!的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 工程伦理课后答案
- 下一篇: 读书笔记||函数探幽