Blogger Information
Blog 10
fans 0
comment 0
visits 7420
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
iframe框架与css基础
 有料!
Original
803 people have browsed it

1.内联框架常用属性

序号 标签
1 iframe 内联框架声明标签
2 srcdoc 规定页面的 HTML 内容显示在行内框架中,可包裹 html 标签
3 src 链接页面地址
4 style 规定内敛框架样式
5 name 规定 iframe 的名称一般用来 a 标签跳转

2.当前页面显示地图

  1. <!-- 1.默认框架内地图 -->
  2. <div>
  3. <iframe src="https://j.map.baidu.com/3c/Vu"></iframe>
  4. </div>
  5. <!-- 2.点击链接显示地图 -->
  6. <div style="margin-top: 20px">
  7. <a href="https://j.map.baidu.com/3c/Vu" target="jinan">济南市地图</a>
  8. <iframe srcdoc="<em>济南市地图</em>" name="jinan"></iframe>
  9. </div>

3.iframe 迷你后台案例

  1. <style type="text/css">
  2. body {
  3. margin: 0;
  4. display: grid;
  5. grid-template-columns: 10em 1fr;
  6. }
  7. .header {
  8. grid-column: span 2;
  9. height: 3em;
  10. background-color: lightblue;
  11. }
  12. .aside {
  13. display: grid;
  14. grid-template-rows: repeat(auto-fit, 2em);
  15. background-color: lightcyan;
  16. }
  17. iframe {
  18. width: 100%;
  19. min-height: 42em;
  20. background-color: #fff;
  21. border: none;
  22. padding: 2em;
  23. }
  24. a {
  25. text-decoration: none;
  26. color: #555;
  27. background-color: #fff;
  28. border-bottom: 1px solid #ccc;
  29. border-right: 1px solid #ccc;
  30. }
  31. </style>
  1. <div class="header">网站管理后台</div>
  2. <div class="aside">
  3. <a href="https://www.baidu.com" target="content">百度一下</a>
  4. <a href="https://music.163.com/" target="content">网易云官网</a>
  5. <a href="http://tianqi.2345.com/" target="content">天气预报</a>
  6. <a href="http://www.4399.com/" target="content">4399小游戏</a>
  7. </div>
  8. <div class="main">
  9. <iframe srcdoc="<p>点击左侧,我来显示内容<p>" name="content"></iframe>
  10. </div>

html5 标签

1.html5 页面常用标签

序号 属性
1 header 头部
2 main 页面主体
3 footer 页脚
4 article 文章标签
5 section 区块

2.html 页面布局小案例

  1. <style type="text/css">
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. }
  7. body {
  8. width: 100vw;
  9. height: 100vh;
  10. display: grid;
  11. grid-template-rows: 60px 1fr 60px;
  12. gap: 10px;
  13. }
  14. header,
  15. footer {
  16. height: 80px;
  17. background-color: lightgreen;
  18. text-align: center;
  19. }
  20. .container {
  21. display: grid;
  22. grid-template-columns: 200px 1fr;
  23. gap: 10px;
  24. padding: 10px;
  25. background-color: lightskyblue;
  26. }
  27. .container > aside {
  28. background-color: lightcyan;
  29. text-align: center;
  30. }
  31. .container > main {
  32. display: grid;
  33. grid-template-rows: 1fr 200px;
  34. background-color: wheat;
  35. text-align: center;
  36. padding: 10px;
  37. }
  38. .container > main > div {
  39. display: grid;
  40. grid-template-columns: 1fr 1fr;
  41. gap: 10px;
  42. }
  43. main div section {
  44. background-color: violet;
  45. }
  46. </style>

ifrome框架# css 基础语法

1.css 基础规则

术语:选择器,声明块,规则,属性和值

序号 属性
1 选择器 标签选择器<br>类选择器<br>id 选择器
2 声明块 声明块由一对{…..}包裹的内容
3 规则 由选择器加声明块组成
4 属性和值 声明块中的明值对

1.css 语法优先级

一个元素会受到四个级别声明影响

  1. 继承的:根据元素在文档中的结构和层级关系来确定它最终的样式
  2. 用户代理样式:浏览器的,大多数浏览器表现基本一致
  3. 自定义的:写到 html 文档中头部 style 标签中
  4. 行内样式(内联样式),写到 style 属性中的

2.层叠优先级

标签选择器<属性选择器<id 选择器

  1. h1 {
  2. color: green !important;
  3. /* !important强制提权 */
  4. }
  5. .active {
  6. color: red;
  7. }
  8. #first {
  9. color: royalblue;
  10. }
  1. <h1 class="active" id="first">HelloWord</h1>
Correcting teacher:天蓬老师天蓬老师

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!