第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

有了絕對定位之后為什么水平居中效果沒有消失呢?

有了絕對定位之后為什么水平居中效果沒有消失呢?

一壺時光 2018-07-22 13:00:27
<!DOCTYPE html><html><head>?<meta charset="utf-8">?<style type="text/css">?body{margin: 0;background:#333;}?ul{margin: 0;padding: 0;}?li{list-style: none;}?#pic{width: 400px;height:500px;position:relative;margin: 0 auto;}?#pic img{width: 400px;height:500px;}?#pic ul{position: absolute;top:0;right: -50px;}?#pic li{width: 40px;height: 40px;margin-bottom: 4px;background:#666;}?#pic .active{background:yellow; }?#pic p,#pic span{width: 400px;height: 30px;line-height: 30px;color:red;position: absolute;left:0;text-align: center;}?#pic span{top: 0;}?#pic p{bottom: 0;}?</style>?<script type="text/javascript">?</script></head><body>?<div id="pic">??<img src="C:/Users/馮新星/Desktop/Saved Pictures/pic.jpg"/>??<span>數(shù)據(jù)加載中</span>??<p>圖片加載中</p>??<ul>???<li class="active"></li>???<li></li>???<li></li>???<li></li>??</ul>?</div></body></html>為什么我代碼定位的是在父元素的left:0;處,顯示的卻是在水平居中位置呢?
查看完整描述

1 回答

?
奮斗好青年

TA貢獻69條經(jīng)驗 獲得超30個贊

不大理解你想問的意思,你是不是想要整塊內(nèi)容不居中呢?那么去掉#pic中的:margin: 0 auto;這個樣式即可啦

查看完整回答
反對 回復(fù) 2018-07-23
  • 1 回答
  • 0 關(guān)注
  • 1369 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號