[size=medium]here is a very little used and unknown method which allows you to utilise JavaScript within a CSS file. The CSS Expression property allows you to assign a JavaScript expression to a CSS property. For example, this allows you to set the position of an element according to the browser size.
width:expression(document.body.clientWidth > 950 ? "950px": "100%" );
Do not use CSS Expression, they are unreliable, slow and are only supported in IE!
CSS Expression suddenly came to me as a solution for the currently much debated feature (here and here) of variables in CSS3. This could theoretically be currently achieved through the use of CSS Expressions.
function blue() {
return 'blue';
}
body { background: expression(blue()); }
CSS Expressions are horrible and unsupported, so please don’t use them in development. They do, however, highlight a interesting and little known feature of CSS.[/size]
分享到:
相关推荐
CSS3 is the latest version of Cascading Style Sheets, the language that in the hands of a skilled designer turns the ugly duckling of unadorned ... In one sense, they’re right. Instead of one massive ...
AutoJs源码-wzry.ugly.min.ugly.min.ugly.min.ugly.min.ugly.min.ugly.min。本资源购买前提醒:本源码都是实际autojs项目模板,安装好autojs直接运行即可打开。1、支持低版本autojs。2、资源仅供学习与参考,请勿...
pku acm1338 Ugly Numbers 代码 动态规划思想,采用链表实现,解题报告请访问:http://blog.csdn.net/china8848
pku acm 1338 Ugly Numbers代码 动态规划思想,数组实现 解题报告请访问:http://blog.csdn.net/china8848
新小学英语四年级下册Unit The ugly ducklingPPT课件.pptx
The Good, The Bad, and the ugly, The UNIX Legacy.pdf 专家观点 UNIX的美与丑!
资源来自pypi官网。 资源全名:augly-0.1.9-py3-none-any.whl
亚特兰大 AtCSS是使用构建的基于注释CSS处理工具。 安装 $ npm install -g atcss 例子 input.css : @import url ( "test/fixtures/import.css" );... too-long-and-ugly-selector-name { /* * @use .base-2 */ m
这两天在弄linux下的东西,用的是RedHat EnterPrise 6,但由于其yum源是收费的,就使用的是对应的CentOS6,但更新后发觉安装音乐解码器插件时还是差了这几个包,纠结了好久,终于找齐了,一并传上来,希望能帮到有...
Ugly Face
ugly_num.exe
解决ubuntu系统自带的Rthymbox音乐播放器默认不支持mp3和wma格式音乐的播放
rehel6下安装mp3插件所需要的rpm包,tar.gz解压出来就是rpm包, tar -zxvf gstrem-ugly.tar.gz cd gstream-ugly yum install *.rpm
各种数据结构、算法及实用的C#源代码.C#,阿格里数(Ugly Number)的多种算法与源代码 阿格里数,即丑数(Ugly Number)、逊数(Humble Number)。 一般而言:把只包含质因子2,3和5的数称作丑数(Ugly Number)。...
这应该通过./plugins.js所有非常轻量级的插件运行,并针对ugly.css ./plugins.js运行它们以生成pretty.css 唯一的依赖是postcss ,该工具的插件架构将为 CSS 构建工具链提供一个真正可扩展的框架。 另外,它有源...
As a technical editor for several books myself, I know how difficult it is to catch all of the mistakes (missing semicolons and the like), but the level of technical errors in this book was shocking....
ugly的反义词在看参考.doc
gstreamer mp3 音频解码插件
安装git clone git@github.com:jeremiak/postcss-style-linter.git && cd postcss-style-linter npm install npm start 这应该通过./plugins.js所有非常轻量级的插件运行,并针对ugly.css运行它们以生成pretty.css ...