当前位置:网站首页>点击input时,不显示边框!
点击input时,不显示边框!
2022-07-26 09:18:00 【小萌新入场】
点击input时,不显示边框!
① input{ outline: none; }
鼠标点击input时,出显的黑色边框,怎么去除的问题?
input{ outline: none; }
可以给边框(border)设置一个颜色,然后把边框轮廓(outline)给去掉,点击的时候就不会出现黑色的边框了,outline设置轮廓的样式,样式是 none时,轮廓不会出现,希望对大家有帮助!
②:focus 伪类选择器
像这种问题一般都用在 :focus 伪类选择器 ,用于选取获得焦点的表单元素,焦点也即是光标。
一般情况下 input 类表单元素才能获取:focus伪类选择器。废话不多少上代码 ,在input:focus 中,点击去除input 显示的边框,如下:(图片可以忽略)
.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>百度输入框</title>
<style> input {
width: 520px; height: 40px; border: none; box-shadow: 0px 1px 2px #888888 inset; background: url(./images/camera_01.png) no-repeat 480px center; } input:focus {
width: 520px; height: 40px; border: none; outline: none; box-shadow: 0px 0px 3px #005efe inset; background: url(./images/camera_02.png) no-repeat 480px center; } </style>
</head>
<body>
<input type="text" name="" id="">
</body>
</html>
边栏推荐
- 【Mysql】Mysql锁详解(三)
- 209. Subarray with the smallest length
- Li Mu D2L (IV) -- softmax regression
- (2006,Mysql Server has gone away)问题处理
- Datax的学习笔记
- 756. Serpentine matrix
- Summary of common activation functions for deep learning
- 垂直搜索
- Hbuilderx runs the wechat developer tool "fail to open ide" to solve the error
- Pat grade a A1034 head of a gang
猜你喜欢
随机推荐
【Mysql】认识Mysql重要架构(一)
redis原理和使用-基本特性
PAT 甲级 A1013 Battle Over Cities
NTT(快速数论变换)多项式求逆 一千五百字解析
redis原理和使用-安装和分布式配置
2022茶艺师(中级)特种作业证考试题库模拟考试平台操作
Babbitt | metauniverse daily must read: does the future of metauniverse belong to large technology companies or to the decentralized Web3 world
What is the difference between NFT and digital collections?
JS - DataTables 关于每页显示数的控制
Elastic APM安装和使用
垂直搜索
[leetcode database 1050] actors and directors who have cooperated at least three times (simple question)
Codeworks DP collection
Sending and receiving of C serialport
[use of final keyword]
jvm命令归纳
(2006, MySQL server has gone away) problem handling
The Child and Binary Tree-多项式开根求逆
STM32+MFRC522完成IC卡号读取、密码修改、数据读写
【无标题】









