1. CSS的全稱是什么?
Cascading style sheets
2. CSS有幾種引入方式? link 和@import 有什么區(qū)別?
1) 內(nèi)聯(lián)樣式 eg: <h1 style="color:red; font-size: 20px;"></h1>
2 ) 內(nèi)部樣式: eg:
<style type = "text/css">
h1 {
color : red;
font-size:20px;
</style>
3 ) 外部樣式:
1)) eg:
<head>
<link rel = "stylesheet" type="text/css" href="index.css">
</head>
2)) <style>
@import url("hello.css");
@import "world.css ";
</style>
區(qū)別:
link 是html 的標(biāo)簽
@import 是css 的語(yǔ)法 是css 的 不是html 的標(biāo)簽、 他是放在樣式文件里。
4) 瀏覽器默認(rèn)樣式尉共。
3. 以下這幾種文件路徑分別用在什么地方却紧,代表什么意思?
>css/a.css : 當(dāng)前相對(duì)路徑
> ./css/a.css : 當(dāng)前相對(duì)路徑
>b.css : 當(dāng)前同級(jí)文件
>../imgs/a.png : 上一級(jí)目錄文件
/Users/hunger/project/css/a.css : 絕對(duì)路徑
/static/css/a.css : 網(wǎng)站路徑
http://cdn.jirengu.com/kejian1/8-1.png : 線上路徑
4 如果我想在js.jirengu.com上展示一個(gè)圖片汉操,需要怎么操作?
1).把本地圖片上傳到一個(gè)地方 生成一個(gè)線上地址 淑际。之后再用
2)走搁。本地測(cè)試的時(shí)候 可以用 localhost生成一個(gè)網(wǎng)址 再用
5 .列出5條以上html和 css 的書(shū)寫(xiě)規(guī)范
1) 語(yǔ)法不區(qū)分大小寫(xiě) 但建議統(tǒng)一小寫(xiě)
2) 不使用內(nèi)聯(lián)的style屬性定義樣式
3) id 和class使用有意義的單詞 分隔符建議使用 -
4) 用可能就使用縮寫(xiě)
5) 屬性值是0 的省略單位
6) 塊內(nèi)容縮進(jìn)
7) 屬性名冒號(hào)后面加一個(gè)空格
6. 截圖介紹 chrome 開(kāi)發(fā)者工具的功能區(qū)
2017-08-17 00-41-45屏幕截圖.png