使用 CSS3 扩展用户界面
cssweb developmentfront end technology更新于 2025/12/10 14:04:17
为了扩展用户界面,CSS 提供了 resize 和 outline-offset 属性。以下是示例 −
示例
<!DOCTYPE html>
<html>
<head>
<style>
div {
margin: 20px;
border: 1px solid rgb(0, 26, 255);
outline: 4px dashed rgb(90, 2, 86);
outline-offset: 15px;
}
textarea {
display: inline-block;
}
</style>
</head>
<body>
<h1>Extending user interface example</h1>
<h3>Resize property</h3>
<textarea style="resize: none;">Textarea : Not resizable</textarea>
<textarea>Textarea - Resizable (By default)</textarea>
<h3>Outline property</h3>
<div>Some text inside div</div>
</body>
</html>
输出
上述代码将产生以下输出 −

相关文章
有用资源
css 参考教程 - 该教程包含有关 css 的更多信息:https://www.cainiaomax.com/css/

