CSS3 calc()验证:值错误:宽度解析错误 [英] CSS3 calc() validation: Value Error : width Parse Error

查看:85
本文介绍了CSS3 calc()验证:值错误:宽度解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要验证一个CSS3文件,其中我使用以下代码:

I need to validate a CSS3 file where I'm using the following code:

width:calc(96.3% - 312px)

会返回此错误:

值错误:width解析错误 - 312px)

Value Error : width Parse Error - 312px)

我最后一个选择是使用Javascript函数

My last choice is to use a Javascript function on page load and window resize to get the width value when it's possible using CSS3 (only for IE8 or older).

推荐答案

这会出现在页面加载和窗口调整大小以获得宽度值。成为验证器中的错误。您的 calc()语法有效。不要担心。

This appears to be a bug in the validator. Your calc() syntax is valid. Don't worry about it.

每当你需要验证你的CSS,只删除那个声明,所以不会导致不可恢复的解析错误。

Whenever you need to validate your CSS, remove just that declaration so it does not cause irrecoverable parse errors.

这篇关于CSS3 calc()验证:值错误:宽度解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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