用css居中图像 [英] Centering an image with css

查看:85
本文介绍了用css居中图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这很简单,但我无法在任何地方找到它。


在HTML中,我使用< center>< img src =" whatever.gif>< /中心],[水平地

将页面上的图形居中。什么是CSS方式做同样的事情?


谢谢,卡罗琳


---- ==通过Newsfeeds.Com发布 - 无限制-Uncensored-Secure Usenet News == ----
http://www.newsfeeds。 com 世界排名第一的新闻组服务! 120,000多个新闻组

---- =东海岸和西海岸服务器农场 - 通过加密实现全隐私= ----

I think this is an easy one, but I have not been able to find it anywhere.

In HTML, I used <center><img src="whatever.gif></center> to horizontally
center a graphic on a page. What is the CSS way of doing the same?

Thanks, Carolyn

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

推荐答案

Carolyn Marenger< ca **** @ marenger.com>写道:
Carolyn Marenger <ca****@marenger.com> wrote:
在HTML中,我使用< center>< img src =" whatever.gif>< / center>水平地将图形置于页面中心。这样做的CSS方式是什么?
In HTML, I used <center><img src="whatever.gif></center> to horizontally
center a graphic on a page. What is the CSS way of doing the same?




p {text-align:center}


< p>< ; img src =" image.png" alt =" alt content here"< / p>


-

Spartanicus



p{text-align:center}

<p><img src="image.png" alt="alt content here"></p>

--
Spartanicus


Spartanicus写道:
Spartanicus wrote:
Carolyn Marenger< ca **** @ marenger.com>写道:
Carolyn Marenger <ca****@marenger.com> wrote:
在HTML中,我使用< center>< img src =" whatever.gif>< / center>水平地将图形置于页面中心。什么是CSS方式做同样的事情?
In HTML, I used <center><img src="whatever.gif></center> to horizontally
center a graphic on a page. What is the CSS way of doing the same?



p {text-align:center}

< p>< img src =" image .PNG" alt =" alt content here"< / p>



p{text-align:center}

<p><img src="image.png" alt="alt content here"></p>




谢谢!


Carolyn


---- ==通过Newsfeeds.Com发布 - 无限制 - 未经审查 - 安全Usenet新闻== ----
http://www.newsfeeds.com 世界排名第一的新闻组服务! 120,000多个新闻组

---- =东海岸和西海岸服务器农场 - 通过加密实现全隐私= ----



Thanks!

Carolyn

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


Carolyn Marenger :
Carolyn Marenger:
我认为这是一个简单的,


它是。

但是我无法在任何地方找到它。
I think this is an easy one,
It is.
but I have not been able to find it anywhere.




实际上很难相信,你是如何搜索的?



That''s actually hard to believe, how did you search?


这篇关于用css居中图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆