Blogger Information
Blog 6
fans 0
comment 0
visits 4840
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
HTML引用CSS案列
神一样的男子
Original
647 people have browsed it

下面案列的服务器地址为:http://211.149.255.191:90/day05/index.html

效果图:

  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. <link rel="stylesheet" href="style/css3.css" />
  8. </head>
  9. <body>
  10. <div class="nav">
  11. <div class="logo">
  12. <img src="1.jpg" alt="" id="logoimg" />
  13. <label for="img" id="logotext">LOGO</label>
  14. </div>
  15. <ul>
  16. <li>
  17. <a href="" id="home">home</a>
  18. <a href="" id="chat">chat</a>
  19. <a href="" id="shop">shop</a>
  20. <a href="" id="my">my</a>
  21. </li>
  22. </ul>
  23. </div>
  24. <div class="list">
  25. <ul>
  26. <li>前端基础: html5/css3/flex/grid</li>
  27. <li>php开发: php+pdo+mvc+composer</li>
  28. <li>前端进阶: javascript + jquery + layui</li>
  29. <li>Laravel: 实战</li>
  30. </ul>
  31. </div>
  32. </body>
  33. </html>

CSS1.css:

  1. .nav {
  2. height: 50px;
  3. background-color: #eee;
  4. display: flex;
  5. align-items: center;
  6. }
  7. .nav ul {
  8. display: flex;
  9. list-style: none;
  10. }
  11. .nav ul a {
  12. color: #666;
  13. text-decoration: none;
  14. padding: 0 15px;
  15. }
  16. #logotext {
  17. color: green;
  18. margin-left: 10px;
  19. }
  20. #logoimg {
  21. width: 50px;
  22. height: 50px;
  23. }
  24. ```css
  25. ### css2.css:
  26. ```css
  27. .list {
  28. border: 1px solid #ccc;
  29. background-color: #efefef;
  30. padding: 15px 30px 15px;
  31. margin-top: 20px;
  32. }
  33. .list ul > li {
  34. margin: 10px;
  35. }

css3.css

  1. @import "css1.css";
  2. @import "css2.css";
  3. @media screen and (max-width: 320px) {
  4. #home,
  5. #shop,
  6. #my {
  7. display: none;
  8. }
  9. #chat {
  10. font-size: 30pt;
  11. color: green;
  12. }
  13. }
  14. * {
  15. outline: 1px solid red;
  16. }
Correcting teacher:天蓬老师天蓬老师

Correction status:unqualified

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