對focus
尺寸textbox
似乎縮小/縮小。但是,如果border-width
設置爲2px
,則無法觀察到這種降低。我想將border-width
設置爲1px
,但沒有像效果那樣的減少。如何做呢?文字框尺寸縮小/縮小焦點
#name:focus{
\t outline:none;
\t border:1px solid rgba(81, 203, 238, 1);
\t box-shadow:0 0 5px rgba(81, 203, 238, 1);
}
#name2:focus{
\t outline:none;
\t border:2px solid rgba(81, 203, 238, 1);
\t box-shadow:0 0 5px rgba(81, 203, 238, 1);
}
<!doctype html>
<html>
<head>
</head>
<body>
Border-width changes to 1px on focus<br>
<input type="text" id='name'><p>
Border-width changes to 2px on focus<br>
<input type="text" id='name2'><p>
Default textbox no effects added<br>
<input type="text" id='check'>
</body>
</html>
包括填充解決了這個問題。感謝你的付出! – 007mrviper