Blogger Information
Blog 31
fans 2
comment 0
visits 27678
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
伪类与伪元素
霏梦
Original
606 people have browsed it

- 作者:霏梦

  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>伪类与伪元素</title>
  7. <style>
  8. a {
  9. }
  10. #login {
  11. display: none;
  12. }
  13. #login:target {
  14. display: block;
  15. }
  16. input:focus {
  17. background-color: yellowgreen;
  18. }
  19. input::selection {
  20. color: white;
  21. background-color: red;
  22. }
  23. /* not */
  24. .list > :not(:nth-of-type(3)) {
  25. color: red;
  26. }
  27. /* ::before */
  28. .list::before {
  29. content: "购物车";
  30. font-size: 1.5em;
  31. border-bottom: red 1px solid;
  32. }
  33. /* after */
  34. .list::after {
  35. content: "结尾";
  36. color: royalblue;
  37. font-size: 1.5em;
  38. }
  39. </style>
  40. </head>
  41. <body></body>
  42. <!-- <a href="#login">我要登录</a> -->
  43. <button onclick="location='#login'">从这登录:</button>
  44. <form action="" method="post" id="login">
  45. <label for="email">邮箱:</label>
  46. <input type="email" name="email" id="email" />
  47. <label for="password">密码:</label>
  48. <input type="password" name="password" id="password" />
  49. <button>登录</button>
  50. </form>
  51. <hr />
  52. <ul class="list">
  53. <li>test1</li>
  54. <li>test2</li>
  55. <li>test3</li>
  56. <li>test4</li>
  57. </ul>
  58. </html>
Correcting teacher:WJWJ

Correction status:qualified

Teacher's comments:可以加点解释文字跟图片,让自己更深刻理解!
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post