成都创新互联网站制作重庆分公司

HTML基础(四)-创新互联

框架

通过使用框架,你可以在同一个浏览器窗口中显示不止一个页面。每份HTML文档称为一个框架,并且每个框架都独立于其他的框架。

创新互联公司成立以来不断整合自身及行业资源、不断突破观念以使企业策略得到完善和成熟,建立了一套“以技术为基点,以客户需求中心、市场为导向”的快速反应体系。对公司的主营项目,如中高端企业网站企划 / 设计、行业 / 企业门户设计推广、行业门户平台运营、成都APP应用开发手机网站制作、微信网站制作、软件开发、绵阳服务器托管等实行标准化操作,让客户可以直观的预知到从创新互联公司可以获得的服务效果。

使用框架的坏处:

  • 开发人员必须同时跟踪更多的HTML文档

  • 很难打印整张页面

框架结构标签()

框架结构标签()定义如何将窗口分割为框架

  • 每个 frameset 定义了一系列行

  • rows/columns 的值规定了每行或每列占据屏幕的面积

框架标签(Frame)

Frame 标签定义了放置在每个框架中的 HTML 文档。

在下面的这个例子中,我们设置了一个两列的框架集。第一列被设置为占据浏览器窗口的 25%。第二列被设置为占据浏览器窗口的 75%。HTML 文档 "frame_a.htm" 被置于第一个列中,而 HTML 文档 "frame_b.htm" 被置于第二个列中

假如一个框架有可见边框,用户可以拖动边框来改变它的大小。为了避免这种情况发生,可以在 标签中加入:noresize="noresize"。

为不支持框架的浏览器添加 标签。</p><p>重要提示:不能将 <body></body> 标签与 <frameset></frameset> 标签同时使用!不过,假如你添加包含一段文本的 <noframes> 标签,就必须将这段文字嵌套于 <body></body> 标签内。(在下面的第一个实例中,可以查看它是如何实现的。)</p><p>简单的框架嵌套:三个框架都可拖动边框修改大小</p><pre><html> <frameset&nbsp;rows="50%,50%"> <frame&nbsp;src="1.html"> <frameset&nbsp;cols="25%,75%"> <frame&nbsp;src="2.html"> <frame&nbsp;src="3.html"> </frameset> </frameset> </html></pre><pre><html> <frameset&nbsp;cols="50%,*,25%"> &nbsp;&nbsp;&nbsp;<!--&nbsp;加入noresize后标记的框架无法拖动边框来修改大小&nbsp;--> &nbsp;&nbsp;<frame&nbsp;src="1.html"&nbsp;noresize="noresize"&nbsp;/> &nbsp;&nbsp;<frame&nbsp;src="2.html"&nbsp;/> &nbsp;&nbsp;<frame&nbsp;src="3.html"&nbsp;/> </frameset> </html></pre><p><strong>内联框架</strong></p><h3>添加 iframe 的语法</h3><pre><iframe&nbsp;src="URL"></iframe></pre><p><em>URL</em>指向隔离页面的位置。</p><h3>Iframe - 设置高度和宽度</h3><p>height 和 width 属性用于规定 iframe 的高度和宽度。</p><p>属性值的默认单位是像素,但也可以用百分比来设定(比如 "80%")。</p><h3>Iframe - 删除边框</h3><p>frameborder 属性规定是否显示 iframe 周围的边框。</p><p>设置属性值为 "0" 就可以移除边框:</p><h3>使用 iframe 作为链接的目标</h3><p>iframe 可用作链接的目标(target)。</p><p>链接的 target 属性必须引用 iframe 的 name 属性:</p><pre><html> <body> <!--&nbsp;设置内联框架的指向为1.html&nbsp;名字是test&nbsp;--> <iframe&nbsp;src="1.html"&nbsp;name="test"></iframe> <!--&nbsp;添加的链接名称为Baidu,链接内联网页test,地址为Baidu网址&nbsp;, 点击后在内联框架中跳至Baidu&nbsp;--> <p><a&nbsp;href="http://www.baidu.com"&nbsp;target="test">Baidu</a></p> <p><b>注释:</b>由于链接的目标匹配&nbsp;iframe&nbsp;的名称,所以链接会在&nbsp;iframe&nbsp;中打开。</p> </body> </html></pre><p></p><h3>背景(Backgrounds)</h3><p><body> 拥有两个配置背景的标签。背景可以是颜色或者图像。</p><h4>背景颜色(Bgcolor)</h4><p>背景颜色属性将背景设置为某种颜色。属性值可以是十六进制数、RGB 值或颜色名。</p><h4>背景(Background)</h4><p>背景属性将背景设置为图像。属性值为图像的URL。如果图像尺寸小于浏览器窗口,那么图像将在整个浏览器窗口进行复制。</p><pre><body&nbsp;background="clouds.gif"> <body&nbsp;background="/file/tupian/20230130/247494.jpg"></pre><p>URL可以是相对地址,如第一行代码。也可以使绝对地址,如第二行代码。</p><p>提示:如果你打算使用背景图片,你需要紧记一下几点:</p><ul><li><p>背景图像是否增加了页面的加载时间。小贴士:图像文件不应超过 10k。</p></li><li><p>背景图像是否与页面中的其他图象搭配良好。</p></li><li><p>背景图像是否与页面中的文字颜色搭配良好。</p></li><li><p>图像在页面中平铺后,看上去还可以吗?</p></li><li><p>对文字的注意力被背景图像喧宾夺主了吗?</p></li></ul><p></p><h3>基本的注意事项 - 有用的提示:</h3><p><body> 标签中的背景颜色(bgcolor)、背景(background)和文本(text)属性在最新的 HTML 标准(HTML4 和 XHTML)中已被废弃。W3C 在他们的推荐标准中已删除这些属性。</p><p>应该使用层叠样式表(CSS)来定义 HTML 元素的布局和显示属性。</p><p><strong>颜色由红色、绿色、蓝色混合而成。</strong></p><h3>颜色值</h3><p>颜色由一个十六进制符号来定义,这个符号由红色、绿色和蓝色的值组成(RGB)。</p><p>每种颜色的最小值是0(十六进制:#00)。大值是255(十六进制:#FF)。</p><h3>颜色名</h3><p>大多数的浏览器都支持颜色名集合。</p><p>提示:仅仅有 16 种颜色名被 W3C 的 HTML4.0 标准所支持。它们是:aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow。</p><p>如果需要使用其它的颜色,需要使用十六进制的颜色值。</p><p>创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。</p> <br> 网站名称:HTML基础(四)-创新互联 <br> 标题URL:<a href="http://cxhlcq.com/article/dpgsds.html">http://cxhlcq.com/article/dpgsds.html</a> </div> </div> </div> <div class="other container"> <h3>其他资讯</h3> <ul> <li> <a href="/article/ihjdic.html">golang怎么改变gopath</a> </li><li> <a href="/article/ihjcog.html">python可以支持r语言的吗</a> </li><li> <a href="/article/ihjdpg.html">Mysql的时间函数有哪些</a> </li><li> <a href="/article/ihjcoo.html">cdn厂商主要有哪几家</a> </li><li> <a href="/article/ihjdjj.html">python把字符串转化成数字的方法</a> </li> </ul> </div> <div class="footer"> <div class="foota container"> <div class="foot_nav fl col-lg-8 col-md-8 col-sm-12 col-xs-12"> <ul> <li class="col-lg-3 col-md-3 col-sm-3 col-xs-6"> <h3>网站制作</h3> <a href="http://m.cdcxhl.com/" target="_blank">成都网站制作</a><a href="http://www.cqcxhl.com/" target="_blank">网站制作</a><a href="http://www.cxhljz.cn/" target="_blank">成都网站制作</a><a href="http://www.gawzjs.com/" target="_blank">广安网站制作公司</a><a href="http://chengdu.xwcx.net/mobile/" target="_blank">移动手机网站制作</a><a href="http://m.cdcxhl.com/" target="_blank">成都网站制作</a> </li> <li class="col-lg-3 col-md-3 col-sm-3 col-xs-6"> <h3>企业服务</h3> <a href="https://www.cdcxhl.com/shoulu/" target="_blank">分类目录网站</a><a href="https://www.cdcxhl.com/service/shipinxuke.html" target="_blank">食品经营许可证</a><a href="https://www.cdcxhl.com/link/" target="_blank">友情链接购买</a><a href="https://www.cdcxhl.com/service/beian.html" target="_blank">网站备案</a><a href="https://www.cdcxhl.com/mianfei/jianzhan/" target="_blank">成都免费建站</a><a href="https://www.cdcxhl.com/shoulu/" target="_blank">网站快速收录</a> </li> <li class="col-lg-3 col-md-3 col-sm-3 col-xs-6"> <h3>网站建设</h3> <a href="https://www.cdcxhl.com/h5.html" target="_blank">成都h5网站建设</a><a href="http://www.myzwz.com/" target="_blank">绵阳网站建设</a><a href="http://chengdu.cdcxhl.cn/shop/" target="_blank">成都商城网站建设</a><a href="http://www.cdkjz.cn/" target="_blank">成都网站建设</a><a href="https://www.cdcxhl.com/mobile.html" target="_blank">移动网站建设</a><a href="http://seo.cdkjz.cn/wangzhan/" target="_blank">营销型网站建设</a> </li> <li class="col-lg-3 col-md-3 col-sm-3 col-xs-6"> <h3>服务器托管</h3> <a href="https://www.cdcxhl.com/idc/cqhx.html" target="_blank">重庆电信回兴机房托管</a><a href="https://www.cdcxhl.com/tuoguan/" target="_blank">IDC机房托管</a><a href="https://www.cdcxhl.com/idc/zongshu.html" target="_blank">棕树服务器托管</a><a href="http://www.cdxwcx.cn/tuoguan/mianyang.html" target="_blank">绵阳机房托管</a><a href="https://www.cdcxhl.com/idc/meishan.html" target="_blank">眉山服务器托管</a><a href="http://www.cdfuwuqi.com/" target="_blank">服务器托管机房</a> </li> </ul> </div> <div class="footar fl col-lg-4 col-md-4 col-sm-12 col-xs-12"> <p>全国免费咨询:</p> <b>400-028-6601</b> <p>业务咨询:028-86922220 / 13518219792</p> <p>节假值班:18980820575 / 13518219792</p> <p>联系地址:成都市太升南路288号锦天国际A幢1002号</p> </div> </div> <div class="footb"> <div class="copy container"> <div class="fl">Copyright © 成都创新互联科技有限公司重庆分公司 <a href="https://beian.miit.gov.cn/" target="_blank">渝ICP备2021005571号</a></div> <!--<div class="fr"><a href="https://www.cdxwcx.com/" target="_blank">成都网站建设</a>:<a href="https://www.cdcxhl.com/" target="_blank">创新互联</a></div>--> </div> </div> <div class="link"> <div class="container"> 友情链接:: <a href="https://www.cdcxhl.com/" target="_blank">成都网站建设</a> <a href="https://www.cdcxhl.com/city/chongqing.html" target="_blank">重庆网站建设</a> <a href="">四川网站建设</a> <a href="">重庆建设网站</a> <a href="https://www.cdxwcx.com/jifang/xiyun.html" target="_blank">移动服务器托管</a> <a href="http://www.cdfuwuqi.com/" target="_blank">成都服务器托管</a> <a href="https://www.cdcxhl.cn/" target="_blank">云服务器</a> <a href="http://www.cdhuace.com/" target="_blank">广告设计制作</a> <a href="https://www.cdcxhl.com/sheji/chongqing.html" target="_blank">重庆网页设计</a> <a href="https://www.cdcxhl.com/zuo/chongqing.html" target="_blank">重庆做网站</a> <a href="https://www.cdcxhl.com/zhizuo/chongqing.html" target="_blank">重庆网站制作</a> <a href="">重庆网站建设</a> <a href="">重庆网站公司</a> <a href="">渝中网站制作</a> <a href="">重庆网站设计</a> </div> </div> </div> <div class="foot"> <ul class="public-celan"> <li> <a href="https://p.qiao.baidu.com/cps3/chatIndex?siteToken=6ce441ff9e2d6bedbdfc2a4138de449e&speedLogId=162260383240185e3_1622603832401_02407&eid=6256368&reqParam=%7B%22from%22%3A1%2C%22sessionid%22%3A%22-100%22%2C%22siteId%22%3A%2211284691%22%2C%22tid%22%3A%22-1%22%2C%22userId%22%3A%226256368%22%2C%22ttype%22%3A1%2C%22pageId%22%3A0%7D" target="_blank" class="a1 db tc"> <img src="/Public/Home/img/icon-23.png" alt="" class="db auto"> <span class="span-txt">在线咨询</span> </a> </li> <li> <a href="tel:18980820575" class="a1 db tc"> <img src="/Public/Home/img/icon-24.png" alt="" class="db auto"> <span class="span-txt">电话咨询</span> </a> </li> <li> <a target="_blank" href="tencent://message/?uin=1683211881&Site=&Menu=yes" class="a1 db tc"> <img src="/Public/Home/img/icon-25.png" alt="" class="db auto"> <span class="span-txt">QQ咨询</span> </a> </li> <li> <a target="_blank" href="tencent://message/?uin=532337155&Site=&Menu=yes" class="a1 db tc public-yuyue-up"> <img src="/Public/Home/img/icon-26.png" alt="" class="db auto"> <span class="span-txt">预约顾问</span> </a> </li> </ul> </div> <div class="customer"> <dl class="icon1"> <dt> <a href="tencent://message/?uin=1683211881&Site=&Menu=yes"> <i class="iconT"><img src="/Public/Home/img/QQ.png" alt=""></i> <p>在线咨询</p> </a> </dt> </dl> <dl class="icon2"> <dt><i><img src="/Public/Home/img/weixin.png" alt=""></i><p>微信咨询</p></dt> <dd><img src="/Public/Home/img/ewm.png"></dd> </dl> <dl class="icon3"> <dt><i><img src="/Public/Home/img/dianhua.png" alt=""></i><p>电话咨询</p></dt> <dd> <p>028-86922220(工作日)</p> <p>18980820575(7×24)</p> </dd> </dl> <dl class="icon4"> <dt class="sShow"> <a href="tencent://message/?uin=244261566&Site=&Menu=yes"> <i><img src="/Public/Home/img/dengji.png" alt=""></i><p>提交需求</p> </a> </dt> </dl> <dl class="icon5"> <dt class="gotop"> <a href="#top"> <i><img src="/Public/Home/img/top.png" alt=""></i><p>返回顶部</p> </a> </dt> </dl> </div> </body> </html> <script> $(".con img").each(function(){ var src = $(this).attr("src"); //获取图片地址 var str=new RegExp("http"); var result=str.test(src); if(result==false){ var url = "https://www.cdcxhl.com"+src; //绝对路径 $(this).attr("src",url); } }); window.onload=function(){ document.oncontextmenu=function(){ return false; } } </script>