鼠标样式 cursor

参数 | 说明 |
---|---|
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>

<!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>

防止拖拽文本域 resize
如图所示,右下角可以拖拽

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>
网友评论