CSS和Javascript简单复习资料

2019-06-05 23:46:46刘景俊

CSS:

内联样式表 标签内直接加style=””

嵌入式样式表 定义在<head>标签

              <style type=”text/css”>

外部样式表   

              <link rel=”StyleSheet” href=”style.css”>

 

       选择器:

HTML选择器:接在html标签后加css

                            如:p{color:red}

                     class选择器:1 在html标签后加class名,再加css

                            如:p.red{color:red}

                                          2 直接加class名,再加css

                            如:.red{color:red} 注意前面有个点

                     ID选择器:在ID前加一个#号

                            如:#red{color:red} ID选择器只为某一ID的控件使用