请老师检查,在按钮处存在疑问
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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | <!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" /> < meta http-equiv = "X-UA-Compatible" content = "IE=edge" /> < meta name = "viewport" content = "width=device-width, initial-scale=1.0" /> < title >TEST1</ title > < link rel = "stylesheet" href = "CSS/css.css" /> </ head > < body > <!-- 页面头部 --> < header > < div class = "header-main" > <!-- 页面logo --> < div class = "logo" > < img src = "images/logo.png" alt = "" /> </ div > <!-- 页面导航区域 --> < nav > < 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 = "" >EVENTS</ a ></ li > < li >< a href = "" >CONTACT</ a ></ li > </ ul > </ nav > </ div > </ header > <!-- 页面banner --> < div class = "banner" > <!-- banner图片 --> < div class = "banner-image" > < img src = "images/banner3.jpg" alt = "" /> </ div > <!-- banner遮罩层 --> < div class = "banner-shadow" ></ div > <!-- banner表单 --> < div class = "banner-form" > < form action = "" > < input type = "text" placeholder = "your Name" /> < input type = "text" placeholder = "your Phone" /> < input type = "email" placeholder = "your Email" /> < textarea name = "" id = "" cols = "30" rows = "10" placeholder = "write Your Comment Here" ></ textarea > < input type = "submit" value = "SEND MESSSAGE" /> </ form > </ div > </ div > <!-- 页面主要内容 --> < section class = "content" > <!-- about --> < div class = "about" > <!-- about上半部分 --> < div class = "about-top" > < h3 >ABOUT</ h3 > < div class = "split" ></ div > < div class = "text" > Lorem Ipsum is simply dummy text of the printing and typesetting< br /> industry. Lorem Ipsum has been the industry's standard dummy < br />text ever since the 1500s. </ div > </ div > <!-- about下半部分 --> < div class = "about-bottom" > < h3 > A WORD< br /> ABOUT US </ h3 > < div class = "about-bottom-left" > < div class = "text" > Praesent dignissim viverra est, sed bibendum ligula congue non. Sed ac nisl et felis gravida commodo? Suspendisse eget ullamcorper ipsum. Suspendisse diam amet. </ div > < input type = "button" value = "EXPLORE" /> </ div > < img src = "images/bb3.jpg" alt = "" /> < div class = "about-bottom-right" > < div class = "top" > < span class = "text" >70000</ span > < div class = "split" ></ div > < span class = "text" >Student</ span > </ div > < div class = "bottom" > < span class = "text" >600</ span > < div class = "split" ></ div > < span class = "text" >Faculty</ span > </ div > </ div > </ div > </ div > <!-- 图文混排 --> < div class = "images-and-text" > < div class = "image" > < img src = "images/b1.jpg" alt = "" /> </ div > < div class = "text" > < h3 >Library</ h3 > < div class = "text1" > Lorem Ipsum is simply dummy text of the printing and typesetting industry </ div > < div class = "text2" > Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </ div > < input type = "button" value = "EXPLORE" /> </ div > < div class = "image" > < img src = "images/b2.jpg" alt = "" /> </ div > < div class = "text" > < h3 >Library</ h3 > < div class = "text1" > Lorem Ipsum is simply dummy text of the printing and typesetting industry </ div > < div class = "text2" > Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </ div > < input type = "button" value = "EXPLORE" /> </ div > < div class = "text" > < h3 >Library</ h3 > < div class = "text1" > Lorem Ipsum is simply dummy text of the printing and typesetting industry </ div > < div class = "text2" > Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </ div > < input type = "button" value = "EXPLORE" /> </ div > < div class = "image" > < img src = "images/b3.jpg" alt = "" /> </ div > < div class = "text" > < h3 >Library</ h3 > < div class = "text1" > Lorem Ipsum is simply dummy text of the printing and typesetting industry </ div > < div class = "text2" > Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </ div > < input type = "button" value = "EXPLORE" /> </ div > < div class = "image" > < img src = "images/b4.jpg" alt = "" /> </ div > </ div > <!-- gallery --> < div class = "gallery" > <!-- gallery上半部分 --> < div class = "gallery-top" > < h3 >GALLERY</ h3 > < div class = "split" >分割线</ div > < br /> < div class = "text" > Lorem Ipsum is simply dummy text of the printing and typesetting< br /> industry. Lorem Ipsum has been the industry's standard dummy < br />text ever since the 1500s. </ div > </ div > <!-- gallery下半部分 --> < div class = "gallery-bottom" > < dl > < dt >< img src = "images/03-01.jpg" alt = "" /></ dt > < dd >Science Lab</ dd > < br /> < dt >< img src = "images/03-02.jpg" alt = "" /></ dt > < dd >Indoor Stadium</ dd > < br /> < dt >< img src = "images/03-03.jpg" alt = "" /></ dt > < dd >Transportation</ dd > < br /> < dt >< img src = "images/03-04.jpg" alt = "" /></ dt > < dd >Kids Room</ dd > < br /> < dt >< img src = "images/03-05.jpg" alt = "" /></ dt > < dd >Meditation Classes</ dd > < br /> < dt >< img src = "images/03-06.jpg" alt = "" /></ dt > < dd >Kids Play Ground</ dd > < br /> </ dl > </ div > </ div > </ section > <!-- 页脚 --> < div class = "footer" >© 2016 imooc.com 京ICP备13046642号</ 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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | * { margin : 0 ; padding : 0 ; } a { text-decoration : none ; } ul { list-style : none ; } header { background-color : #07cbc9 ; } header .header-main { width : 1200px ; height : 80px ; margin : 0 auto ; } header .logo img { float : left ; height : 48px ; margin : 16px 0 ; } header nav { /* width: 580px; */ height : 80px ; float : right ; } header nav ul li { float : left ; /* width: 80px; */ height : 80px ; line-height : 80px ; text-align : center ; /* margin-right: 20px; */ /* border: 1px solid #000; */ font-size : 16px ; } header nav ul li:last-child { margin-right : 0 ; } header nav ul li a { display : block ; /* width: 80px; */ height : 80px ; padding : 0 10px ; color : white ; } header nav ul li a:hover { background-color : gold; } .banner { position : relative ; width : 100% ; height : 600px ; } .banner .banner-image img { width : 100% ; height : 600px ; } .banner .banner-shadow { background-color : rgba( 0 , 0 , 0 , 0.5 ); width : 100% ; height : 600px ; position : absolute ; top : 0 ; left : 0 ; } .banner .banner-form { /* border: 1px solid red; */ position : absolute ; height : 400px ; top : 0px ; width : 504px ; left : 50% ; margin-left : -252px ; padding : 100px 0 ; } .banner .banner-form form { text-align : center ; } .banner .banner-form input { width : 502px ; height : 38px ; margin-bottom : 20px ; color : #808080 ; border : 1px solid #808080 ; background : none ; } .banner .banner-form input:last-child { width : 200px ; height : 40px ; margin-bottom : 0 ; /* margin: 0 auto; */ } .banner .banner-form textarea { width : 502px ; height : 108px ; margin-bottom : 20px ; background : none ; } .content .about { width : 1201px ; overflow : hidden ; margin : 0 auto ; margin-top : 30px ; } .content .about .about- top h 3: first-child { font-size : 32px ; text-align : center ; } .content .about .split { width : 60px ; height : 3px ; background-color : #07cbc9 ; margin : 10px auto ; } .content .about .about- top .text { text-align : center ; color : gray ; font-size : 14px ; } .content .about .about- bottom { width : 100% ; height : 464px ; padding-top : 30px ; /* background-color: orange; */ position : relative ; } .content .about .about- bottom h 3 { float : left ; /* margin-right: 172px; */ font-size : 28px ; margin-right : 119px ; } .content .about .about-bottom- left { position : absolute ; width : 300px ; padding : 20px ; font-size : 18px ; border : 1px solid gray ; background-color : rgba( 255 , 255 , 255 , 0.5 ); top : 50% ; margin-top : -110px ; } .content .about .about-bottom- left input { background-color : black ; margin-top : 20px ; color : white ; width : 140px ; height : 40px ; text-align : center ; border : none ; } .content .about .about- bottom img { float : left ; width : 650px ; height : 435px ; } .content .about- bottom .about-bottom- right { float : right ; width : 260px ; font-size : 28px ; font-weight : bold ; } .content .about- bottom .about-bottom- right . top , . bottom { border : 1px solid #07cbc9 ; text-align : center ; padding : 40px 0 ; margin-bottom : 30px ; } .content .about- bottom .about-bottom- right .text:last-child { font-size : 16px ; font-weight : normal ; display : block ; } .content .about- bottom .about-bottom- right .split { width : 60px ; height : 3px ; background-color : #07cbc9 ; margin : 10px auto ; } .images-and-text { width : 100% ; height : 760px ; margin : 0 auto ; } .images-and-text > div { width : 25% ; height : 380px ; float : left ; } .images-and-text > div img { height : 100% ; } .images-and-text .text { background-color : #07cbc9 ; } .images-and-text .text h 3 { font-size : 24px ; padding : 20px ; padding-bottom : 30px ; color : white ; } .images-and-text .text .text 1 { font-size : 16px ; text-align : center ; color : rgba( 255 , 255 , 255 , 0.5 ); margin-bottom : 20px ; } .images-and-text .text .text 2 { font-size : 14px ; color : gray ; text-align : center ; margin-bottom : 30px ; } .images-and-text .text input { background-color : black ; color : white ; border : none ; text-align : center ; width : 138px ; height : 40px ; line-height : 40px ; display : block ; margin : 0 auto ; } |
按钮是行内块元素,为什么不能用text-align:center居中呢
10
收起
正在回答 回答被采纳积分+1
1回答
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧