How do I stop internet explorer's propriety gradient filter from cutting off content that should overflow?

后端 未结 4 549
时光说笑
时光说笑 2020-12-08 08:02

I\'m using the internet explorer gradient filter in my CSS.

It was all going well until I noticed that images that are supposed to extend beyond their containers

4条回答
  •  清歌不尽
    2020-12-08 08:28

    I know this doesn't answer your question in particular, but consider your audience. Are they all just Internet Explorer users, or do they represent natural internet user proportions? If they are not all just IE users (maybe in a corporate/education network) then consider using only the standards-compliant methods, and allowing the application/site to degrade gracefully to a browser that doesn't support it, like IE.

    Now, for your question. The reason why it's not working as you expected is that the box does not extend to the end of content, even when overflow is visible. The content simply 'walks' outside the box, but this doesn't make the box bigger. There is no way you can get the box to extend to fit the content, except for not setting the width and/or height properties fixed. In fact, IE had a bug in which instead of overflowing out, the box did extend (this was a bug).

    I can recommend one tip though; use min- and max- instead of width and/or height. They allow you flexible box sizing, with guided boundaries.

提交回复
热议问题