怎么设置textarea的边框和input的边框效果一样
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <!DOCTYPE html> < html > < head > < title >Career</ title > < link rel = "stylesheet" type = "text/css" href = "css/CareerWeb.css" > </ head > < body > < div class = "header" > < div class = "top" > < div class = "logo" > < a href = "#" >< img src = "../images/logo.png" ></ a > </ div > < div class = "menu" > < ul > < li >< a href = "#" >HOME</ a ></ li > < li >< a href = "#" >ABOUT</ a ></ li > < li >< a href = "#" >GALLERY</ a ></ li > < li >< a href = "#" >FACULTY</ a ></ li > < li >< a href = "#" >EVENT</ a ></ li > < li >< a href = "#" >CONTACT</ a ></ li > </ ul > </ div > </ div > </ div > < div class = "content" > < div class = "banner" > < div class = "banner-img" > < img src = "../images/banner3.jpg" > </ div > < div class = "banner-text" > < ul > < li >< input type = "text" name = "" placeholder = "your Name" ></ li > < li >< input type = "text" name = "" placeholder = "your Phone" ></ li > < li >< input type = "text" name = "" placeholder = "your email" ></ li > < li >< textarea class = "textarea" placeholder = "Write your comment here" ></ textarea > < li >< input type = "submit" value = "SENGD MESSAGE" name = "" ></ li > </ ul > </ div > </ div > </ div > < div class = "footer" ></ div > </ body > </ html > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | *{ margin : 0px ; padding : 0px ; } body{ font-family :Microsoft YaHei UI; width : 100% ; } .header . top { width : 100% ; height : 80px ; line-height : 80px ; background : #07cbc9 ; overflow : hidden ; position : fixed ; z-index : 100 ; } .header . top .logo{ position : relative ; float : left ; top : 15px ; margin-left : 100px ; } .header . top .menu { margin-right : 80px ; float : right ; } .header . top .menu ul{ list-style : none ; } .header . top .menu ul li{ float : left ; margin-left : 20px ; } .header . top .menu ul li:hover{ background : #000 ; } a{ text-decoration : none ; } .content .banner .banner-img { margin-top : 80px ; position : absolute ; z-index : 10 ; } .content .banner .banner-img img{ width : 100% ; height : 700px ; } .content .banner .banner-text{ position : absolute ; top : 30% ; left : 38% ; z-index : 50 ; } .content .banner .banner-text ul{ list-style : none ; } .content .banner .banner-text ul li{ margin-bottom : 30px ; opacity: 0.4 ; } .content .banner .banner-text ul li input[type= "text" ]{ width : 400px ; height : 40px ; background : #000 ; color : white ; border : 1px solid ; } .content .banner .banner-text ul li textarea{ width : 400px ; height : 150px ; background : #000 ; border : 5px solid ; } .content .banner .banner-text ul li input[type= "submit" ]{ height : 40px ; position : relative ; left : 130px ; background : #000 ; color : white ; border : 1px solid ; } |
怎么设置textarea的边框和input的边框效果一样
15
收起
正在回答
1回答
同学你好,这里同学是想表达,在设置input的边框时,没有数据输入边框为白色,当有数据输入时,边框为蓝色的效果吗,同学可以参考如下代码完成哟,例如;
如果我的回答解决了你的疑惑,请采纳。祝:学习愉快~
2. 从网页搭建入门JavaWeb
- 参与学习 人
- 提交作业 676 份
- 解答问题 9666 个
本阶段将从前端网页搭建入手,到Java Web基础,前后端结合助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧