我想要在文本框的右上角创建一个像下面图片中的那样的角落。
请问我该如何使用CSS实现?
我有以下文本框,需要在其右上角应用这个角落。
![enter image description here](https://istack.dev59.com/Po4ug.webp)
我有以下文本框,需要在其右上角应用这个角落。
.up {
width: 0;
height: 0;
border-style: solid;
border-width: 25px 25px 0 0;
border-color: #489af2 transparent transparent transparent;
position:relative;
}
.textbox{
width:43px;
height:23px;
text-align:right;
padding-bottom:0px;
padding-top:4px;
position:absolute;
}
.up p {
top: -35px;
left: 2px;
position: relative;
z-index:1;
color:#FFF;
font-size:11px;
font-weight:bold;
//transform: rotate(-45deg);
}
<input type="number" class="textbox"/>
<div class="up">
<p>3.9</p>
</div>