Blogger Information
Blog 18
fans 0
comment 0
visits 7742
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
登录表单,简单后台架构,元素样式来源与优先级
只如初见
Original
472 people have browsed it

登录表单

代码

  1. <form action="" method="post">
  2. <div><label for="name">用户名:</label><input type="text" name="username" id="name" placeholder="请输入用户名" required></div>
  3. <div><label for="psw">密码:</label><input type="password" name="password" id="psw" placeholder="请输入密码" required></div>
  4. <div><label for="email">邮箱:</label><input type="email" name="email" id="email" placeholder="请输入邮箱" required></div>
  5. <div><button>提交</button></div>
  6. </form>

效果图

简单后台架构

代码

  1. <div class="header">
  2. <h1>管理后台</h1>
  3. <div>
  4. <span>xiaoliu</span>
  5. <a href="">退出</a>
  6. </div>
  7. </div>
  8. <ul class="nav">
  9. <li><a href="demo1.html" target="content">菜单项1</a></li>
  10. <li><a href="demo1.html" target="content">菜单项2</a></li>
  11. <li><a href="demo1.html" target="content">菜单项3</a></li>
  12. <li><a href="demo1.html" target="content">菜单项4</a></li>
  13. </ul>
  14. <iframe src="" frameborder="3" name="content"></iframe>

效果图

元素样式来源与优先级

代码

  1. <!-- 来源1: 代理样式/浏览器样式/默认样式 -->
  2. <h2>Hello</h2>
  3. <!-- 来源2: 自定义样式, 会覆盖默认样式 -->
  4. <h2 style="color: red">world</h2>
  5. <!-- 来源3: 书写顺序,写在后面的同名属性会覆盖前面的(优先级相同的情况下) -->
  6. <div>
  7. <!-- 某些属性具有继承特征,例如颜色,字号,字体,子元素会继承父元素的同名属性 -->
  8. <h1 style="color: blue">php.cn</h1>
  9. </div>
  10. <!-- 样式优先级:行内样式,文档样式,外部样式 -->
  11. <!-- 1. 默认样式: 继承自html -->
  12. <!-- 2. 自定义样式1: 行内样式, style属性 -->
  13. <!-- 3. 自定义样式2: 文档样式/内部样式, style标签 -->
  14. <!-- 4. 自定义样式3: 外部样式, css文档 link引入/import-->

效果图

Correcting teacher:PHPzPHPz

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!