css3怎么让img上下左右居中

html,body {width:100%; height:100%} img.ct {position:absolute; width:300px; height:200px; left:50%; top:50%; margin-left:-150px; margin-top:-100px}
css3怎么让img上下左右居中
<style> html,body {width:100%; height:100%} img.ct {position:absolute; width:300px; height:200px; left:50%; top:50%; margin-left:-150px; margin-top:-100px}</style><img class=ct src="图片路径自己加"/>2016-11-16
mengvlog 阅读 45 次 更新于 2025-10-30 17:37:19 我来答关注问题0
檬味博客在线解答立即免费咨询

CSS相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部