一个精致的风格问题:) [英] a delicate style problem :)

查看:48
本文介绍了一个精致的风格问题:)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,所以请,谁知道如果他帮助我我会很高兴


所以,我想为网站指定一个不透明度logo''DIV,我做了,这个:


代码-start-


div.logo {

... / *其他格式化css脚本* /

filter:alpha(opacity = 60); / *这是IE中的不透明度(Internet Explorer)* /

-moz-opacity:0.6; / *这是Mozilla Firefox中的不透明度* /

... / *其他格式化css脚本* /

}


代码-end-


我的html代码如下所示:


Code -start-


< div class =" logo">

< img src =" logo4.jpg">

< / div> ;


代码-End-


在我的意图中是制作div,只有DIV是透明的,而不是实际的徽标!,但是


它本身是透明的,它从它的父母接缝......我怎么能禁用


的不透明度,标志?


如果我指定如下:


代码-start-


.logo img {


filter:alpha(opacity = 100); / *这是IE中的不透明度(Internet Explorer)* /

-moz-opacity:1.0; / *这是Mozilla Firefox中的不透明度* /

}


它使得相对于div的不透明度,但我想禁用它在所有!!


我该怎么办?

解决方案

Sup dvdriper,欢迎!致TSDN!


如果您只想在这一部分使用透明度,那么请使用id。不是阶级。是的,它继承了你的div的样式。因为img嵌套在你的div中。


此外,如果您只想要徽标的透明度,那么给它自己的徽标id,然后使用代码删除透明度。


如果您不知道如何使用id它真的很简单。

展开 | 选择 | Wrap | 行号


你可以为Mozilla使用CSS属性''opacity'',因为它理解它并且你不需要''-moz-opacity''。


Sup dvdriper,欢迎!致TSDN!


如果您只想在这一部分使用透明度,那么请使用id。不是阶级。是的,它继承了你的div的样式。因为img嵌套在你的div中。


此外,如果您只想要徽标的透明度,那么给它自己的徽标id,然后使用代码删除透明度。


如果您不知道如何使用id它真的很简单。

展开 | 选择 | Wrap | 行号< /跨度>

hi, I have a problem, so please, who knows something I''d be very happy if he helps me

so, I wanted to specify an opacity for the site logo''s DIV, i did, this:

Code -start-

div.logo {
... /*Other formating css script*/
filter: alpha(opacity=60); /*this is for opacity in IE (Internet Explorer)*/
-moz-opacity: 0.6; /*this is for opacity in Mozilla Firefox*/
... /*Other formating css script*/
}

Code -end-

my html code looks like this:


Code -start-

<div class="logo">
<img src="logo4.jpg">
</div>

Code -end-

in my intensions was to make the div, ONLY the DIV transparent, not actually the logo!, but

it was made transparent by itself, it seams from it''s parent... how can I disable the

opacity, of the logo?

If i specify like this:

Code -start-

.logo img {

filter: alpha(opacity=100); /*this is for opacity in IE (Internet Explorer)*/
-moz-opacity: 1.0; /*this is for opacity in Mozilla Firefox*/

}

it makes the opacity relative to the div, but I wanna disable it at all!!

how can I do that?

解决方案

Sup dvdriper, Welcome! To TSDN!

If you''re wanting the transparency only on this one section then use "id" not "class". Yes it inherited the styling of your "div" because "img" was nested in your "div".

Furthermore if you''re only wanting the transparency on your logo, then give the logo it''s own "id", then use the code to "remove" the transparency.

Incase you don''t know how to use id it''s really simple.

Expand|Select|Wrap|Line Numbers


You can use the CSS property ''opacity'' for Mozilla since it understands it and you don''t need ''-moz-opacity''.


Sup dvdriper, Welcome! To TSDN!

If you''re wanting the transparency only on this one section then use "id" not "class". Yes it inherited the styling of your "div" because "img" was nested in your "div".

Furthermore if you''re only wanting the transparency on your logo, then give the logo it''s own "id", then use the code to "remove" the transparency.

Incase you don''t know how to use id it''s really simple.

Expand|Select|Wrap|Line Numbers


这篇关于一个精致的风格问题:)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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