+ -
当前位置:首页 → 问答吧 → 如何在css中进行计算?

如何在css中进行计算?

时间:2011-03-25

来源:互联网

.holidayPM
  {
  border-bottom-color:Green;
  border-bottom-width:300px;
  border-bottom-style:solid;
  width:600px;
  }

css如上,目前是直接将 border-bottom-width写为width的一半

但是如果我不知道width的确切数值的时候,border-bottom-width如何指定为width的一半?

作者: Twister_JJ   发布时间: 2011-03-25

额 。能计算?

作者: fengyarongaa   发布时间: 2011-03-25

引用 1 楼 fengyarongaa 的回复:

额 。能计算?

应该可以的 用expression就可以 但是有些浏览器不支持expression,所以我想知道有没有其他方法

作者: Twister_JJ   发布时间: 2011-03-25

竟然想用css计算,高手啊

作者: mingfish2   发布时间: 2011-03-25

手动写 或者 js设置吧

作者: KK3K2005   发布时间: 2011-03-25