CSS样式-轮廓

outline:

0

none:

<!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>Document</title>
    <style type="text/css">
      
    </style>
</head>
<body>
    <input type="text">
</body>
</html>
 
原始状态下,鼠标放入输入库框,会有对应的框边:
放入前:
CSS样式-轮廓

 

放入后:

CSS样式-轮廓

增加outline:none后的样式:

<!DOCTYPE html>
<html lang="en">
<head>
 
    <title>Document</title>
    <style type="text/css">
        input {
            outline: none;
        }
    </style>
</head>
<body>
    <input type="text">
</body>
</html>

 

放入前:
CSS样式-轮廓

放入后:

CSS样式-轮廓

 还可以额外给input添加些样式:

<!DOCTYPE html>
<html lang="en">
<head>
 
    <title>Document</title> 
    <style type="text/css">
        input {
            outline: none;
            border: 1px solid #ccc;
            width: 150px;
            height: 25px;
            background: url(images/s.png) no-repeat 130px center;
        }
    </style>
</head>
<body>
    <div>
        <input type="text">
    </div>
    
</body>
</html>

CSS样式-轮廓

 

 

resize:

none:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Document</title> 
    <style type="text/css">
 
        textarea {
            outline: none;
            resize: none;
        }
    </style>
</head>
<body>
    <div>
        <textarea cols="10" rows="30"></textarea>
    </div>  
</body>
</html>
 
CSS样式-轮廓

 

 

CSS样式-轮廓

上一篇:使用css3属性border-image实现锯齿边框


下一篇:vue-htmlwebplugin的使用