简体   繁体   中英

How make a textarea with changeable width and height and with a lable on the upper border on the right corner with HTML5 and CSS3

I neeed to make a textarea with changeable width and height and with a lable on the upper border on the right corner with HTML5 and CSS3 like below picture : 在此处输入图片说明

How can I do this? Any help will be appriciated!

Something like this?

 body { font-size:14px; } .form-control { display:inline-block; position:relative;} label { text-align:right; background-color:white; right:5px; top:-5px; position:absolute;} textarea { display:block; }
 <div class="form-control"> <label for="#myTextArea">My Label</label> <textarea>My text area</textarea> </div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM