1
有人知道如何讓我的::after
點擊率能夠使用下面的輸入嗎?點擊率僞元件
form {
position: relative;
}
form label {
pointer-events: none;
}
form label::after {
content: '';
position: absolute;
width: 50%;
height: 100%;
background: transparent;
border: 2px solid red;
top: -6px;
left: -4px;
z-index: 0;
pointer-events: none;
max-width: 300px;
}
form input {
display: inline-block;
position: relative;
z-index: -1;
width: 100%;
max-width: 300px;
padding: 22px 20px 26px 20px;
border: 1px solid gray;
}
<form action="">
<label for="">
</label>
<input type="text">
</form>
控制如何? – BenM
正常使用。能夠將文本寫入輸入 –
你的意思是專注於「輸入」? – BenM