以下為本站文章分類清單

  1. AJAXspacer
  2. ASPspacer
  3. CSSspacer
  4. Javascriptspacer
  5. Windows 應用程式spacer
  6. 網頁設計
  7. 評論、短文、雜文spacer
  8. 版主spacer
  9. 最新回應spacer

以下為本頁本文內容

IE 透明度失效和 zoom:1 有關?

5/15 08' icon

看到我把標題槓掉,就知道這又是一個以訛傳訛的消息!

之前有人在問 zoom 的功用,果然又是和雅虎佈落格有關係,據說,如果沒有加上 zoom:1 的話,filter:alpha(opacity) 會失效

真正重點是:filter 濾鏡可以進行許多視覺化效果,不過 filter 效果多半只能套用在指定區塊中(例如指定寬及高),來看例子:

正常來說,效果應該是:

001

但這個例子在 IE 中的效果卻是:

002

加個 zoom:1 看看:

003

如果不加 zoom:1 改用 width:100% 看看:

003

所以,使用 zoom:1 或 width:100% 對 IE「啟用」filter 都有效,主要原因是在於 filter 套用到物件上時,物件必需是「有形體」,再講簡單點,必需「明確知道套用範圍」,這在 IE 中稱為 layout,同時 IE 支援 hasLayout 這個屬性,妙的地方是 hasLayout 這個屬性沒 HTML 寫法,也就是只能使用 JavaScript / JScript 來驅動,使這個屬性變成啟動或不啟動。當 hasLayout 為 true 時,filter 的效果才能產生。

雖然 hasLayout 並沒有 HTML 語法可以驅動,不過某些 CSS 屬性一旦被指定,hasLayout 自動調整為 true,這些 CSS 屬性是:

屬性名稱 啟動 hasLayout 的值 取消 hasLayout
display inline-block  
width / height 除了 auto 外任何值 auto
position absolute static
float left 或 right none
zoom 有就好 normal 或空值

所以,zoom:1 只是用來驅動 hasLayout 屬性的一種方法而已,那重點來了,使用 filter 的下場,看看這個例子:

結果如:004

正常情況應是:005

這裡強調一下,我用的字型是「微軟正黑體」,在 Vista 作業系統中是內建字型,只不過 IE7 並未內建指定使用微軟正黑體。這類圓滑字,一旦被 render 成 layout,下場就上圖所示!這時深底色就影響不大!

 

以下為文章回應區

同意轉載,不過麻煩看一下轉載需知

plaza.rakuten.co.jp   2017/8/13 上午 04:32:00

Have you ever considered writing an ebook or guest authoring on other websites?

I have a blog based on the same topics you discuss and would
love to have you share some stories/information. I know my visitors would enjoy
your work. If you are even remotely interested, feel free to send me
an email.

How long does Achilles tendonitis last for?   2017/8/4 上午 10:46:00

I'm not sure exactly why but this site is loading extremely slow for me.
Is anyone else having this problem or is it a problem on my end?

I'll check back later on and see if the problem still exists.

Can you have an operation to make you taller?   2017/7/31 下午 12:22:00

I feel that is one of the so much significant
information for me. And i'm satisfied reading your article.
However wanna observation on few general issues, The web
site style is ideal, the articles is really great :
D. Excellent process, cheers

http://swankybirthmark03.snack.ws/   2017/7/31 上午 02:53:00

I am regular visitor, how are you everybody? This piece of writing posted at this
site is actually nice.

How do I stretch my Achilles tendon?   2017/7/28 上午 11:33:00

Unquestionably consider that which you stated. Your favorite justification appeared to be on the internet the simplest thing to take note of.
I say to you, I certainly get annoyed at the same time as folks think
about worries that they plainly do not know about. You controlled to hit the nail upon the highest and
outlined out the entire thing without having side-effects , other people can take a signal.
Will likely be again to get more. Thanks

What is a heel lift?   2017/7/24 上午 12:41:00

I don't even know how I ended up right here, however I assumed
this submit used to be great. I don't know who you're but definitely you are
going to a well-known blogger should you are not already.
Cheers!

fannierodregez.weebly.com   2017/7/22 下午 05:24:00

constantly i used to read smaller articles which as well
clear their motive, and that is also happening with this article which I am
reading at this time.

   2017/7/15 下午 11:20:00

When someone writes an paragraph he/she maintains the plan of a user in his/her mind that how
a user can understand it. So that's why this piece of writing is great.
Thanks!

foot pain big toe   2017/7/3 下午 01:18:00

You can definitely see your enthusiasm in the work you write.
The sector hopes for more passionate writers such as you who are not afraid to say how they believe.
Always follow your heart.

foot pain from running   2017/7/3 下午 12:53:00

First of all I want to say great blog! I had a quick question that I'd like to ask if you
do not mind. I was curious to know how you center yourself and clear your head before writing.

I've had a tough time clearing my mind in getting my ideas out.

I do enjoy writing however it just seems like the
first 10 to 15 minutes tend to be lost just trying to figure out how
to begin. Any recommendations or tips? Kudos!

manicure   2017/5/4 上午 04:53:00

Hmm it seems like your blog ate my first comment (it was super long) so I
guess I'll just sum it up what I submitted and say, I'm thoroughly enjoying your blog.
I too am an aspiring blog writer but I'm still new to the whole thing.
Do you have any suggestions for rookie blog writers? I'd genuinely appreciate it.

manicure   2017/4/11 下午 06:34:00

You made some good points there. I checked on the web to learn more about the issue and found
most individuals will go along with your views on this site.

Reila   2009/1/10 下午 01:54:00

你好!在透明度設定上ff和ie也顯示成功,但在ie留言時每打一個字,畫面就會跳動一次(在ff上沒問題)
請問是出現了什麼問題呢?

給個回應
姓名:
佈落格網址:
  如果您是要發問問題, 最好有個問題測試的網址, 這樣比較容易找到您問題所在, 謝謝
內容: