简体   繁体   中英

SVG code: Can I use point decimals and percentages on all browsers?

In SVG code I used point decimals: .001 instead of 0.001

And percentage number like 50%

I have been told that using these numbers used to be a cross browser incompatibility issue in the past, but I haven't been able to replicate the problem in 5 browsers.

Should I revisit all my SVGs and replace the point decimals and percentages? Is this not an issue anymore, at least across latest versions of most popular browsers?

Credit to @Robert Longson, and @herrstrietzel

Based on their comments I have deduced that leading point decimal (like.0694) and % values (where appropriate), have no compatibility issues. Simply make sure that your data type supports the values you used by testing in few browsers you have on hand, and if all looks as intended then you are doing it right and its safe to assume that these values will work in all updated popular browsers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM