效果不一樣?
<head> <meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/> <title>無標(biāo)題文檔</title> <style?type='text/css'> body{ font:12px/1.5?tahoma,arial,sans-serif; } .search-tips{ float:right; padding:3px?0?0?15px; } .search-tips?a{ text-decoration:none; color:#6c6c6c; } .search-button{ float:right; } .btn{ ????background:url(http://gtms01.alicdn.com/tps/i1/T1qyj8Fc8aXXc4E9bI-400-300.png); width:100px; height:45px; border:0; background-position:0?-200px; cursor:pointer; } .search-panel{ height:39px; background-color:#f50; overflow:hidden;? padding:3px?0?3px?77px; } .search-panel?input{ height:39px; line-height:39px; border:0?none; width:100%; outline:none; background-color:#FFF; margin:0; } </style> </head> <body> <div?class='container'> ???<div?class='search-list'></div> ???<div?class='search-form'> ??????<form> ?????????<div?class='search-tips'> ????????????<a?href='#'>高級<br?/>搜索</a> ?????????</div> ?????????<div?class='search-button'> ????????????<button?type='submit'?class='btn'></button> ?????????</div> ?????????<div?class='search-panel'> ????????????<input?type='text'?/> ????????????<i></i> ?????????</div> ??????</form> ???</div> </div> </body> </html>
?為什么跟著老師敲出來的效果是下面這樣的??下邊框太細(xì)了...百思不得其解
2022-03-26
class是一個類,是面向?qū)ο缶幊讨杏玫降?a >嗯,謝謝你提醒,后面會追加。
2017-07-23
.search-panel里你沒設(shè)置line-height:39px,但是老師設(shè)置了,這個是設(shè)置input垂直居中。太不仔細(xì)了。。。其實和老師的真不一樣