01-inline.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <input type="button" value="草率的按钮"/>
  10. <br/>
  11. <br/>
  12. <!-- 行内式 使用css inline代表行内 -->
  13. <!-- 使用 属性style(风格) 来引入样式 样式名:样式值;样式名:样式值; ... -->
  14. <!--
  15. width 宽度
  16. height 高度
  17. bg color 背景颜色
  18. border 边框 + 宽度 + 线型 + 线的颜色
  19. font-size 字体大小
  20. font-family 字体
  21. border-radius 边框的弧度
  22. -->
  23. <!-- 缺点:html+css混在一起 样式只对当前的元素有效 -->
  24. <input type="button" value="按钮"
  25. style="
  26. width: 60px;
  27. height: 40px;
  28. background-color: bisque;
  29. border: 1px solid yellowgreen;
  30. font-size: 24px;
  31. font-family: '隶书';
  32. border-radius: 5px;
  33. "
  34. />
  35. <br/>
  36. <br/>
  37. <input type="button" value="按钮"
  38. style="
  39. width: 60px;
  40. height: 40px;
  41. background-color: bisque;
  42. border: 1px solid yellowgreen;
  43. font-size: 24px;
  44. font-family: '隶书';
  45. border-radius: 5px;
  46. "
  47. />
  48. </body>
  49. </html>