美文网首页
css基础

css基础

作者: vs陈默 | 来源:发表于2017-08-16 00:23 被阅读0次

1. CSS的全称是什么?

Cascading style sheets

2. CSS有几种引入方式? link 和@import 有什么区别?

      1) 内联样式       eg:     <h1 style="color:red; font-size: 20px;"></h1>
      2 )   内部样式:    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>

区别:

link 是html 的标签
@import 是css 的语法 是css 的 不是html 的标签、 他是放在样式文件里。

               4)  浏览器默认样式。

3. 以下这几种文件路径分别用在什么地方,代表什么意思?

 >css/a.css  : 当前相对路径    
> ./css/a.css  : 当前相对路径
>b.css   :  当前同级文件
>../imgs/a.png : 上一级目录文件

/Users/hunger/project/css/a.css : 绝对路径
/static/css/a.css : 网站路径
http://cdn.jirengu.com/kejian1/8-1.png : 线上路径

4 如果我想在js.jirengu.com上展示一个图片,需要怎么操作?

1).把本地图片上传到一个地方 生成一个线上地址 。之后再用
2)。本地测试的时候 可以用 localhost生成一个网址 再用

5 .列出5条以上html和 css 的书写规范

1) 语法不区分大小写 但建议统一小写
2) 不使用内联的style属性定义样式
3) id 和class使用有意义的单词 分隔符建议使用 -
4) 用可能就使用缩写
5) 属性值是0 的省略单位
6) 块内容缩进
7) 属性名冒号后面加一个空格

6. 截图介绍 chrome 开发者工具的功能区

2017-08-17 00-41-45屏幕截图.png

相关文章

网友评论

      本文标题:css基础

      本文链接:https://www.haomeiwen.com/subject/okebrxtx.html