html overflow什么意思

html overflow什么意思,第1张

意思:HTML溢出;

HTML缩写:超文本标记语言(Hyper Text Markup Language),标准通用标记语言下的一个应用。HTML 不是一种编程语言,而是一种标记语言 (markup language),是网页制作所必备的。

overflow

英 [ˌəʊvəˈfləʊ]   美 [ˌoʊvərˈfloʊ]

vt.&vi.

溢出,淹没挤满,充满洋溢资源过剩

n.

泛滥,溢出物溢流管充溢,过多超出额

vi.

泛滥,溢出充溢

adj.

溢出的,满出的

扩展资料:

定义和用法

overflow属性规定如何处理如何处理不符合元素框的内容

语法:

Object.style.overflow=visible|hidden|scroll|auto

可能的值

值描述

visible内容不会被修剪,会呈现在元素框之外。

hidden内容会被修剪,但是浏览器不会显示供查看内容的滚动条

scroll内容会被修剪,但是浏览器会显示滚动条以便查看其余的内容。

auto由浏览器决定如何显示。如果需要,则显示滚动条。

实例

本例使用overflow来显示溢出元素框的内容:

&lthtml&gt

&lthead&gt

&ltstyle type="text/css"&gt

div

{

border:thin solid green

width:100px

height:100px

}

&lt/style&gt

&ltscript type="text/javascript"&gt

function hideOverflow()

{

document.getElementById("div1").style.overflow="hidden"

}

&lt/script&gt

&lt/head&gt

&ltbody&gt

&ltdiv id="div1"&gt

This is some text.This is some text.This is some text.

This is some text.This is some text.This is some text.

This is some text.This is some text.This is some text.

&lt/div&gt

&ltbr/&gt

&ltinput type="button"onclick="hideOverflow()"

value="Hide overflow"/&gt

&lt/body&gt

&lt/html&gt

只有在你<div class="wz11" style="overflow:hidden" >这个设定高度的情况下,overflow才能起作用

修改为<div class="wz11" style="overflow:hiddenheight:500px" >后再试试,高度你自己调

想超出你的高度隐藏就用overflow:hidden;

想超出你的高度后出现滚动条就用overflow:auto;


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/8308925.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-15
下一篇2023-04-15

发表评论

登录后才能评论

评论列表(0条)

    保存