CSS:expression(使用百分比和像素来计算) [英] CSS: expression ( use percentage & pixels to calculate )

查看:275
本文介绍了CSS:expression(使用百分比和像素来计算)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要设置DIV的宽度

( 100% - 10px )

使用CSS表达式但一直失败可以有人告诉我什么是

using CSS expression but have been failing can somebody tell me what is the answer to that

推荐答案

你不能这样做,这可能是恼人的,因为你遇到的情况会很好。

You can't do that unfortunatly, and it can be annoying because you do run into instances where it would be great.

您可以使用Javascript来计算元素的像素宽度,但是这会导致混乱和非常复杂,难以快速管理。

You can use Javascript to work out pixel widths of elements, but this gets messy and very complicated to manage very quickly.

我的建议是回到绘图板和重新设计布局以解决此问题。

My recommendation is go back to the drawing board and redesign your layout to work around this issue.

如果您发布了具体示例,我们或许能够帮助您。

If you post specific examples we might be able to help.

这篇关于CSS:expression(使用百分比和像素来计算)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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