css3怎么让img上下左右居中
答案:1 悬赏:0 手机版
解决时间 2021-02-02 04:56
- 提问者网友:愿为果
- 2021-02-01 12:52
css3怎么让img上下左右居中
最佳答案
- 五星知识达人网友:动情书生
- 2021-02-01 13:16
<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="图片路径自己加"/>
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="图片路径自己加"/>
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯