11_整理与复习.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. <style>
  9. /* 内部样式 */
  10. p{
  11. width: 200px;
  12. height: 200px;
  13. }
  14. </style>
  15. <!-- 外部样式 -->
  16. <link rel="stylesheet" href="1_test.css">
  17. </head>
  18. <body>
  19. <!--
  20. 基础标签:
  21. h1-h6 标题
  22. p 段落
  23. img 图片
  24. a 超链接
  25. ul li 列表
  26. div 区块 用来布局
  27. span 文本内容
  28. b 加粗
  29. i 斜体
  30. 表格
  31. table
  32. tr
  33. td
  34. 表单
  35. 文本框
  36. <input type="text">
  37. 密码框
  38. <input type="password">
  39. 单选框
  40. <input type="radio">
  41. 复选框
  42. <input type="checkbox">
  43. 下拉框
  44. select
  45. option
  46. 文本域
  47. textarea
  48. 提交按钮
  49. <input type="submit">
  50. 普通按钮
  51. <input type="button">
  52. css样式
  53. 1、引入css
  54. 内联样式
  55. 内部样式
  56. 外部样式
  57. 2、css 选择器
  58. 标签选择器
  59. div{
  60. }
  61. id选择器(id唯一的)
  62. #xxx{
  63. }
  64. class 类选择器
  65. .aa{
  66. }
  67. 后代选择器
  68. #ul1 .aa{
  69. }
  70. 分组选择器|群组选择器
  71. #ul1 .aa, #xxx{
  72. }
  73. 伪类选择器
  74. a:hover{
  75. }
  76. 3、基础样式
  77. 宽高 背景
  78. width:200px;
  79. height:200px;
  80. background
  81. -color:red; 颜色
  82. -image:url(xx.jpg); 图片
  83. -repeat:no-reprat|repeat; 不重复|重复
  84. -posiotn:0 0; 位置:水平(固定值|left|center|right) 垂直(固定值|top|center|bottom)
  85. 简化为:
  86. background:red url(xx.jpg) no-reprat 0 0;
  87. 字体 相关
  88. font
  89. -size:12px 字体大小 (默认字体大小16px 设置最小字体大小12px)
  90. -family:字体
  91. -weight:400; 字体粗细 100-900 (默认400 )
  92. style:italic|normal 斜体|正常
  93. color:red; 文字颜色
  94. 文本相关属性
  95. text-align:left |right|center; 文本水平对齐
  96. line-height:height ;单行文本垂直居中
  97. text-decoration: underline 下划线|none没有 |line-through中划线
  98. text-indent:20px; 首行缩进
  99. 列表
  100. list-style:none;去掉列表前边的点
  101. -->
  102. <select name="" id="">
  103. <option value="">黑大</option>
  104. <option value="">理工</option>
  105. </select>
  106. <input type="submit">
  107. <input type="button" value="确定">
  108. <input type="reset">
  109. <!-- 内联样式 -->
  110. <div style="width:200px; height:200px; background:red"></div>
  111. <h1 id="xxx"></h1>
  112. <ul id="ul1">
  113. <li></li>
  114. <li class="aa"></li>
  115. <li></li>
  116. <li class="aa"></li>
  117. </ul>
  118. <ul>
  119. <li></li>
  120. <li class="aa"></li>
  121. <li></li>
  122. <li class="aa"></li>
  123. </ul>
  124. </body>
  125. </html>