iT邦幫忙

3

CSS 引入HTML 三種方法

css
  • 分享至 

  • twitterImage
  •  

CSS 引入HTML方法有三種

個人比較推薦 連結式方法

當作一個檔案眾多的網站
用嵌入式是一個相當費工夫的做法

不推薦匯入式方法 缺點是先讀取網頁再讀取css
當使用者看一個網站 會先讀取網頁
他的第一眼是先看到沒排版過的網頁 再看到變成排版過的畫面
嵌入式

<style type="text/css">
div {
background-color:#FFFF;
}
</style>


連結式

<link rel=stylesheet type="text/css" href="main.css">


匯入式

<style type="text/css">
@import "style.css";
</style>


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

0
player
iT邦大師 1 級 ‧ 2011-12-08 10:19:58

還有別種

使用JavaScript進行動態Include
http://www.player.idv.tw/prog/index.php/IncludeFile.js

includeFile.css = function(strUrl)
那個

judyhu iT邦新手 5 級 ‧ 2011-12-13 17:11:18 檢舉

這個好耶! 學起來~ 感謝分享~~ ^_^

我要留言

立即登入留言