亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

我的span為什么不能設置absolute絕對定們呢?

我的span為什么不能設置absolute絕對定們呢?

未來99 2016-10-14 11:23:45
? ? ? ? ? ?<ul?class="header_login">??????????????<li>下載</li>??????????????<li>馬上登錄</li>??????????????<li>注冊</li>??????????</ul>??????????<div?class="header_search_wrapper">??????????<form>????????????<span?id="search_tab">?????????????????<a?href="#">商品</a>?????????????????<i?class="icon_1"></i>?????????????????<span?class="header_search_sub">?????????????????<a?href="#">商品</a>?????????????????<a?href="#">店鋪</a>?????????????????</span>?????????????</span>?????????????<span>????????????<input?type="text"?required="required"?class="search_input"?placeholder="請輸入關鍵詞……">????????????<input?type="submit"?value="搜索">????????????</span>??????????</form>??????????</div>?.header_search_wrapper?{ /*?包裝器的相對定位*/ position:relative; float:?right; height:?45px; width:?425px; line-height:?45px; margin:?13px; border:?2px?solid?#7FC7A0; background-color:?#474645; background-image:?-webkit-linear-gradient(270deg,rgba(255,255,255,1.00)?0%,rgba(97,96,95,1.00)?20.73%,rgba(71,70,69,1.00)?100%); background-image:?-moz-linear-gradient(270deg,rgba(255,255,255,1.00)?0%,rgba(97,96,95,1.00)?20.73%,rgba(71,70,69,1.00)?100%); background-image:?-o-linear-gradient(270deg,rgba(255,255,255,1.00)?0%,rgba(97,96,95,1.00)?20.73%,rgba(71,70,69,1.00)?100%); background-image:?linear-gradient(180deg,rgba(255,255,255,1.00)?0%,rgba(97,96,95,1.00)?20.73%,rgba(71,70,69,1.00)?100%);}/*?span?的絕對定位*/.header_search_sub?{width:?52px;?display:block;?position:absolute;}.header_search_sub?a?{background-color:#FbFbFb;?display:block;?color:#7B7E7D;??border:2px?#81CF82?solid;}.search_input?{height:30px;?width:300px;}.header_login?{float:right;?line-height:70px;?list-style:none;}.header_login?li?{float:left;?width:75px;?color:#747878;}.icon_1?{width:15px;?height:12px;?background:url(../images/i_1.jpg)?left?no-repeat;?display:inline-block;}/* span 的絕對定位*/.header_search_sub {width: 52px; display:block; position:absolute; left:-1px;}.header_search_sub a {background-color:#FbFbFb; display:block; color:#7B7E7D; ?border:2px #81CF82 solid;}.search_input {height:30px; width:300px;}.header_login {float:right; line-height:70px; list-style:none;}.header_login li {float:left; width:75px; color:#747878;}.icon_1 {width:15px; height:12px; background:url(../images/i_1.jpg) left no-repeat; display:inline-block;}
查看完整描述

1 回答

?
未來99

TA貢獻21條經驗 獲得超9個贊

知道了,原來是我自己對三個定位的方式沒有認真理解。

查看完整回答
反對 回復 2016-10-14
  • 1 回答
  • 0 關注
  • 2233 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號