- CSS 教程
- CSS - 首页
- CSS - 路线图
- CSS - 简介
- CSS - 语法
- CSS - 选择器
- CSS - 包含
- CSS - 测量单位
- CSS - 颜色
- CSS - 背景
- CSS - 字体
- CSS - 文本
- CSS - 图片
- CSS - 链接
- CSS - 表格
- CSS - 边框
- CSS - 块级边框
- CSS - 行内边框
- CSS - 外边距
- CSS - 列表
- CSS - 内边距
- CSS - 光标
- CSS - 轮廓
- CSS - 尺寸
- CSS - 滚动条
- CSS - 行内块
- CSS - 下拉菜单
- CSS - 可见性
- CSS - 溢出
- CSS - 清除浮动
- CSS - 浮动
- CSS - 箭头
- CSS - 调整大小
- CSS - 引号
- CSS - 顺序
- CSS - 定位
- CSS - 连字符
- CSS - 悬停
- CSS - 显示
- CSS - 聚焦
- CSS - 缩放
- CSS - 位移
- CSS - 高度
- CSS - 连字符字符
- CSS - 宽度
- CSS - 不透明度
- CSS - Z-Index
- CSS - 底部
- CSS - 导航栏
- CSS - 叠加层
- CSS - 表单
- CSS - 对齐
- CSS - 图标
- CSS - 图片库
- CSS - 注释
- CSS - 加载器
- CSS - 属性选择器
- CSS - 组合器
- CSS - 根元素
- CSS - 盒模型
- CSS - 计数器
- CSS - 剪裁
- CSS - 书写模式
- CSS - Unicode-bidi
- CSS - min-content
- CSS - 全部
- CSS - 内嵌
- CSS - 隔离
- CSS - 滚动溢出
- CSS - Justify Items
- CSS - Justify Self
- CSS - 制表符大小
- CSS - 指针事件
- CSS - Place Content
- CSS - Place Items
- CSS - Place Self
- CSS - 最大块尺寸
- CSS - 最小块尺寸
- CSS - 混合模式
- CSS - 最大内联尺寸
- CSS - 最小内联尺寸
- CSS - 偏移量
- CSS - 重音色
- CSS - 用户选择
- CSS 高级
- CSS - 网格
- CSS - 网格布局
- CSS - Flexbox
- CSS - 可见性
- CSS - 定位
- CSS - 层
- CSS - 伪类
- CSS - 伪元素
- CSS - @规则
- CSS - 文字效果
- CSS - 分页媒体
- CSS - 打印
- CSS - 布局
- CSS - 验证
- CSS - 图片精灵
- CSS - !important
- CSS - 数据类型
- CSS3 教程
- CSS3 - 教程
- CSS - 圆角
- CSS - 边框图片
- CSS - 多重背景
- CSS - 颜色
- CSS - 渐变
- CSS - 盒阴影
- CSS - 盒装饰中断
- CSS - 光标颜色
- CSS - 文本阴影
- CSS - 文本
- CSS - 二维变换
- CSS - 三维变换
- CSS - 过渡
- CSS - 动画
- CSS - 多列
- CSS - 盒尺寸
- CSS - 提示框
- CSS - 按钮
- CSS - 分页
- CSS - 变量
- CSS - 媒体查询
- CSS - 函数
- CSS - 数学函数
- CSS - 遮罩
- CSS - 形状
- CSS - 样式图片
- CSS - 特效性
- CSS - 自定义属性
- CSS 响应式
- CSS RWD - 简介
- CSS RWD - 视口
- CSS RWD - 网格视图
- CSS RWD - 媒体查询
- CSS RWD - 图片
- CSS RWD - 视频
- CSS RWD - 框架
- CSS 工具
- CSS - PX 到 EM 转换器
- CSS - 颜色选择器和动画
- CSS 资源
- CSS - 有用资源
- CSS - 讨论
CSS 数据类型 - <overflow>
CSS 数据类型<overflow>表示用于overflow属性和详细属性overflow-block、overflow-inline、overflow-x和overflow-y的关键字值。
可能的值
<overflow>数据类型使用下面列出的值之一指定。
visible:内容不被裁剪。它延伸到盒子之外。
hidden:内容被裁剪,溢出部分隐藏。
clip:内容在元素的溢出剪切边缘处被裁剪。
scroll:内容被裁剪,并添加滚动条以允许用户滚动查看隐藏的内容。
auto:浏览器在内容溢出时自动添加滚动条。
语法
<overflow> = visible | hidden | clip | scroll | auto
CSS <overflow> - 基本示例
在提供的示例中,CSS 数据类型<overflow>应用于<pre>元素以调节溢出内容的行为。
每个<pre>元素的内容决定了当它超过其定义的尺寸时,基于设置给overflow的不同值,将如何表现。
<html> <head> <style> pre { border: 2px solid black; margin-bottom: 3em; } ::before { font-size: 15px; font-weight: bold; color: white; background: darkorchid; display: inline-block; width: 100%; padding: 5px 10px; box-sizing: border-box; } pre { block-size: 110px; inline-size: 250px; } pre:nth-of-type(1) { overflow: hidden; } pre:nth-of-type(1)::before { content: "hidden: "; } pre:nth-of-type(2) { overflow: clip; overflow-clip-margin: 1em; } pre:nth-of-type(2)::before { content: "clip: "; } pre:nth-of-type(3) { overflow: scroll; } pre:nth-of-type(3)::before { content: "scroll: "; } pre:nth-of-type(4) { overflow: auto; } pre:nth-of-type(4)::before { content: "auto: "; } pre:nth-of-type(5) { overflow: clip; overflow: overlay; overflow-clip-margin: 3em; } pre:nth-of-type(5)::before { content: "overlay (or clip if not supported): "; } pre:nth-of-type(6) { overflow: visible; } pre:nth-of-type(6)::before { content: "visible: "; } </style> </head> <body> <pre> Some say the world will end in fire, Some say in ice. From what I've tasted of desire I hold with those who favour fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great And would suffice. <b>-Robert Frost</b> </pre> <pre> Some say the world will end in fire, Some say in ice. From what I've tasted of desire I hold with those who favour fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great And would suffice. <b>-Robert Frost</b> </pre> <pre> Some say the world will end in fire, Some say in ice. From what I've tasted of desire I hold with those who favour fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great And would suffice. <b>-Robert Frost</b> </pre> <pre> Some say the world will end in fire, Some say in ice. From what I've tasted of desire I hold with those who favour fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great And would suffice. <b>-Robert Frost</b> </pre> <pre> Some say the world will end in fire, Some say in ice. From what I've tasted of desire I hold with those who favour fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great And would suffice. <b>-Robert Frost</b> </pre> <pre> Some say the world will end in fire, Some say in ice. From what I've tasted of desire I hold with those who favour fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great And would suffice. <b>-Robert Frost</b> </pre> </body> </html>
广告