CSS cursor outline resize
2018-12-12 本文已影响9人
roy_pub
鼠标样式 cursor
![](https://img.haomeiwen.com/i2153441/2ffc1605f7e0e702.png)
参数 | 说明 |
---|---|
default | 箭头 |
pointer | 小手 |
move | 移动 |
text | 文本 |
<style>
div {
cursor: move;
}
</style>
轮廓线 outline
如下所示,选中会有一个蓝色的边框,如何取消轮廓线
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<input type="text">
</body>
</html>
![](https://img.haomeiwen.com/i2153441/a38000d3744ac24e.png)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
input {
outline: none;
border: 1px solid lightgray;
width: 200px;
height: 30px;
background: url("images/s.png") no-repeat 180px center;
}
</style>
</head>
<body>
<input type="text">
</body>
</html>
![](https://img.haomeiwen.com/i2153441/54bb06a76d6ea377.png)
防止拖拽文本域 resize
如图所示,右下角可以拖拽
![](https://img.haomeiwen.com/i2153441/0810a6b7740bc3b9.png)
resize: none;可以防止拖拽
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
textarea {
resize: none;
}
</style>
</head>
<body>
<textarea></textarea>
</body>
</html>