css-expressions

Using CSS Expressions are good or bad?

人走茶凉 提交于 2019-12-24 08:46:54
问题 I need some clarifiction on applying expressions in css. Some are suggesting don't go for using css expressions. Please clarify my doubt. thanks 回答1: You should not use CSS expressions since they are constantly evaluated on many user interactions across the web page. Also, Microsoft as deprecated this feature due to this type of complications since IE 8. Please see the following articles: From an article published by Steve Souders at YDN High Performance Web Sites: Rule 7 – Avoid CSS

IE6 performance with CSS expressions

偶尔善良 提交于 2019-12-21 05:15:07
问题 We are developing a web application that will be sold to many clients. There is already one client (a bank) which has decided that it will buy the product once it is ready. Unfortunately due to some miscommunication it came out rather late that the only browser they use is IE6. The application was already started with the thought in mind that it does not need to support anything else below IE7. The results are pretty good too - it's fully useable on IE7/FF/Opera/Safari. Haven't tested on

CSS expression to set height of div

泄露秘密 提交于 2019-12-17 14:55:10
问题 I want to set the height of a div based on CSS expression. Basically it should be set as some % (say 90%) of the viewport width I tried the following, but is not working; height:expression(document.documentElement.clientWidth ? document.documentElement.clientWidth : window.innerWidth ); I am looking at a cross-browser way of doing this (IE7+, FF4+, Safari) 回答1: CSS expressions are not supported anywhere except IE (and are considered a bad idea even there). However, there isn't really another

How to Replace CSS Expressions

≡放荡痞女 提交于 2019-12-08 01:58:59
问题 I have an old ASP web application for Time Sheet entry which is riddled with CSS expressions. They appear in the CSS file: .ApptPage { position : relative; height : expression(Math.max(document.body.offsetHeight-this.offsetTop-document.body.marginTop,0)); border : 0 solid black; } and in the ASP: <IFRAME SRC="TimeSheetView.asp?<%=sQueryStandard%>" id=frameContent style="border-left:0;position:absolute;top:0;width:expression(Math.max(0,divContent.offsetWidth-20));height:expression(Math.max(0

How to Replace CSS Expressions

左心房为你撑大大i 提交于 2019-12-06 09:51:59
I have an old ASP web application for Time Sheet entry which is riddled with CSS expressions. They appear in the CSS file: .ApptPage { position : relative; height : expression(Math.max(document.body.offsetHeight-this.offsetTop-document.body.marginTop,0)); border : 0 solid black; } and in the ASP: <IFRAME SRC="TimeSheetView.asp?<%=sQueryStandard%>" id=frameContent style="border-left:0;position:absolute;top:0;width:expression(Math.max(0,divContent.offsetWidth-20));height:expression(Math.max(0,divContent.offsetHeight-this.offsetTop));border:0px;left:0px;"></IFRAME> The application works fine for

IE6 performance with CSS expressions

一个人想着一个人 提交于 2019-12-03 16:38:17
We are developing a web application that will be sold to many clients. There is already one client (a bank) which has decided that it will buy the product once it is ready. Unfortunately due to some miscommunication it came out rather late that the only browser they use is IE6. The application was already started with the thought in mind that it does not need to support anything else below IE7. The results are pretty good too - it's fully useable on IE7/FF/Opera/Safari. Haven't tested on Chrome, but expect little problems there. Unfortunately there is now the IE6 requirement after all... The

Which browsers still support CSS expressions

烈酒焚心 提交于 2019-12-01 16:16:56
问题 From a blog: The basic idea with CSS expressions is that you will have calculation and dynamic values for properties in the CSS code, something that people have found very useful. A simple example can be implementing max-width behavior in IE 6: width: expression(document.body.clientWidth > 1100)? "1100px" : "auto"; This is the first time I read about them. It seems IE used to support CSS expressions but dropped them in IE8. What other browsers still use them and are they generally a good or

CSS expression to set height of div

偶尔善良 提交于 2019-11-27 16:19:22
I want to set the height of a div based on CSS expression. Basically it should be set as some % (say 90%) of the viewport width I tried the following, but is not working; height:expression(document.documentElement.clientWidth ? document.documentElement.clientWidth : window.innerWidth ); I am looking at a cross-browser way of doing this (IE7+, FF4+, Safari) CSS expressions are not supported anywhere except IE (and are considered a bad idea even there). However, there isn't really another way of doing what you're asking, at least not using just CSS. The only alternative is to use Javascript, and

CSS Expressions

主宰稳场 提交于 2019-11-26 20:28:33
I read somewhere that CSS Expressions were deprecated and shouldn't even be used. I had never heard of them and decided to take a look. I found a code example that kept a floating element in the same spot on the screen, even if you scrolled. <html> <style> #fixed { position:absolute; left:10px; top:expression(body.scrollTop + 50 + "px"); background:white; border:1px solid red;} </style> <body> <p id="fixed">Here is some text, which is fixed.</p> <p> [many times: "stuff <br/>"] </p> </body> </html> This reminded me of the sites that had the "share bars" and stuff at the bottom of their pages.

CSS Expressions

不想你离开。 提交于 2019-11-26 07:37:58
问题 I read somewhere that CSS Expressions were deprecated and shouldn\'t even be used. I had never heard of them and decided to take a look. I found a code example that kept a floating element in the same spot on the screen, even if you scrolled. <html> <style> #fixed { position:absolute; left:10px; top:expression(body.scrollTop + 50 + \"px\"); background:white; border:1px solid red;} </style> <body> <p id=\"fixed\">Here is some text, which is fixed.</p> <p> [many times: \"stuff <br/>\"] </p> <