如何将图像对齐? [英] How to align images to the right?
问题描述
我尝试使用css以这种方式放置一些图片:
I'm trying to use css to put some images this way:
|_________<img1_1>|___<img2_1>|
| |<___img2_2>|
| |__<_img2_3>|
所有图像都应该对齐,我不能使用固定的宽度大小,因为图像的大小可能会有所不同。
All the images should be align right and i cannot use a fixed width size because the size of the images may vary.
图片img1_1位于所有其他网页的左侧(但仍位于网页右侧)。
Image img1_1 is to the left off all the others (but still align right of the page).
pb帮助!
设置全部
推荐答案
图像float to right
for images 2_2 and 2_3 set clear:right
set all images float to right
for images 2_2 and 2_3 set clear:right
如果应该是布局 - 考虑使用DIV在页面上创建区域。
If it's supposed to be a layout - consider using DIVs to create regions on the page.
创建一个内容div,并在其中放置另外2个div。设置其中一个的浮动到右边,并给它一个宽度。在另一个上设置边距。将图片放入其中。
Create a content div and put another 2 divs in it. Set float of one of them to right and give it a width. Set a margin on the other one. Put images in them.
这篇关于如何将图像对齐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!