图像边界! [英] border around images!
问题描述
你好我想在图像周围找到一个漂亮的边框,但不仅仅是使用
simple< img src" ....."边界=" 1 QUOT;>标签。
我在CSS中尝试过它。
我做了以下事情:
< div class =" img_class" >
< img src =" ./ images / img1.jpg"边界=" 0" ALT =" IMG1" />
< / div>
在我的CSS中我有:
..img_class {
border:1px solid#999999;
}
它根本无法工作100%,因为从
底部边框到图像的距离是关闭的。有一些空的空间。甚至添加保证金:0px;
和填充:0px;没有帮助。
任何解决方案吗?
干杯
Hello i want to get a nice border around images, but not just with the
simple <img src"....." border="1"> tag.
I tried it in CSS.
I did the following:
<div class="img_class">
<img src="./images/img1.jpg" border="0" alt="img1" />
</div>
And in my css i have:
..img_class {
border: 1px solid #999999;
}
It doesn''t work 100% as i want it, as the distance to the image from the
bottom border is off. There is some empty space. Even adding margin:0px;
and padding:0px; didn''t help.
Anyone a solution for this?
Cheers
推荐答案
2004年11月15日星期一13:31:52 +0100,Oliver< ol ********** @ web.de>
写道:
On Mon, 15 Nov 2004 13:31:52 +0100, Oliver <ol**********@web.de>
wrote:
你好我想在图像周围找到一个漂亮的边框,但不仅仅是简单的< img src" .....边界=" 1 QUOT;>标签。
我在CSS中尝试过。
我做了以下工作:
< div class =" img_class">
< img src =" ; ./图像/ img1.jpg"边界=" 0" ALT =" IMG1" />
< / div>
这是一个非常差的alt属性。尝试一些实际上会为那些看不见的用户提供图像的替代品。
在我的CSS中我有:
.img_class {
border:1px solid#999999;
}
它不会像我想要的那样100%工作,因为它与图像的距离从
底部边框关闭。有一些空的空间。甚至添加保证金:0px;
和填充:0px;没有帮助。
任何人都可以解决这个问题吗?
Hello i want to get a nice border around images, but not just with the
simple <img src"....." border="1"> tag.
I tried it in CSS.
I did the following:
<div class="img_class">
<img src="./images/img1.jpg" border="0" alt="img1" />
</div>
That''s a very poor alt attribute. Try something that will actually
serve as an alternative to the image for those users who can''t see it.
And in my css i have:
.img_class {
border: 1px solid #999999;
}
It doesn''t work 100% as i want it, as the distance to the image from the
bottom border is off. There is some empty space. Even adding margin:0px;
and padding:0px; didn''t help.
Anyone a solution for this?
为什么要在div上指定边框而不是图像上的边框
本身?
< img src =" ./ images / img1.jpg"类= QUOT; FOO" alt =明智的东西 />
..foo {border:1px solid#999999; }
Steve
Why are you specifying a border on the div and not on the image
itself?
<img src="./images/img1.jpg" class="foo" alt="something sensible" />
..foo { border: 1px solid #999999; }
Steve
在comp.infosystems中的
。 www.authoring.stylesheets ,Oliver写道:
in comp.infosystems.www.authoring.stylesheets, Oliver wrote:
我想在图像周围找到一个漂亮的边框,但不仅仅是
简单< img src" ....."边界=" 1 QUOT;>标签。
i want to get a nice border around images, but not just with the
simple <img src"....." border="1"> tag.
CSS:
img {border:1px solid#999}
HTML
< img alt =" foo" src =" foo">
-
Lauri Raittila< http://www.iki.fi/lr> < http://www.iki.fi/zwak/fonts>
CSS:
img {border:1px solid #999}
HTML
<img alt="foo" src="foo">
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Steve Pugh写道:
Steve Pugh wrote:
2004年11月15日星期一13 :31:52 +0100,Oliver< ol ********** @ web.de>
写道:
On Mon, 15 Nov 2004 13:31:52 +0100, Oliver <ol**********@web.de>
wrote:
它并不像我想要的那样100%工作,因为从底部边框到图像的距离是关闭的。有一些空的空间。甚至添加保证金:0px;
和填充:0px;没有帮助。
任何人都可以解决这个问题吗?
It doesn''t work 100% as i want it, as the distance to the image from the
bottom border is off. There is some empty space. Even adding margin:0px;
and padding:0px; didn''t help.
Anyone a solution for this?
为什么要在div上指定边框而不是图像上的边框
本身?
Why are you specifying a border on the div and not on the image
itself?
如果这还没解决,请尝试将图像声明为显示:块;
-
马克。
http:// tranchant.plus.com/
这篇关于图像边界!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!