w3School首次学习---Day01【CSS】

来源:互联网 发布:qq群踢人软件 编辑:程序博客网 时间:2024/06/05 08:06

    1、给图像或其他元素添加"alt"属性,来提供一条相对应的文字描述。  eg:<img src="xxx.jpg"   alt="图片描述" />

    2、为所在页面的head元素内添加字符集设置描述:<meta http-equiv="Content-Type" content="text/html;charset=xxx" />

    3、id选择器:#idName ;类选择器:.className。  派生选择器:#idName h2{......}

    4、IE7和IE8中支持属性选择器:eg:[title]{color:blue;}

    5、属性和值选择器:[title=hello world]{color:red}  为title值为hello world的所有应用该样式

                                          [title~=hello]{color:red}   为title的值中包含单独hello的对象应用此样式。

    6、input[type="text"]{......}

          input[type="button"]{......}

    7、HTML中的<hr /> 是用来分割上下结构的“水平线”。

    8、将css文件引入html中的用法:<head> <link rel="stylesheet" type="text/css"  href="xxx.css" />   </head>  外部样式表

           内部样式表:<head> <script  type="text/css"> ...... </script> </head>

    9、

                     

0 0
原创粉丝点击