This content originally appeared on foobartel.com :: Stream and was authored by foobartel.com :: Stream
The other day I opened up some SVG files in my text editor to change their color values and I came across a rather strange looking value for opacity.
<style>.svgitem { opacity:3.500000e-02; } </style>
It turns out that this is called “Exponentional Notation” and actually does what you wanted it to do in the first place. ;) If I'm not mistaken, those files have been saved with Adobe Illustrator.
Here's how it works: The E tells you how many places to move the decimal point. A negative number after E says to move the decimal point to the left. A positive number tells you to move the decimal point to the right.
To sum things up: opacity: 3.500000e-02
is exactly the same as opacity: 0.035;
. I have to say that I find the latter notation much easier to read, much easier to write and easier to understand. That's probably why we don't use this on a regular basis ;)
I'm not sure why it would appear like this in those files, maybe someone can shed a light on it someday.
This content originally appeared on foobartel.com :: Stream and was authored by foobartel.com :: Stream

foobartel.com :: Stream | Sciencx (2019-06-13T22:00:00+00:00) Exponential Notation for CSS Property Values. Retrieved from https://www.scien.cx/2019/06/13/exponential-notation-for-css-property-values-2/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.