Exponential Notation for CSS Property Values

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 “Expon…


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


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » Exponential Notation for CSS Property Values." foobartel.com :: Stream | Sciencx - Thursday June 13, 2019, https://www.scien.cx/2019/06/13/exponential-notation-for-css-property-values-2/
HARVARD
foobartel.com :: Stream | Sciencx Thursday June 13, 2019 » Exponential Notation for CSS Property Values., viewed ,<https://www.scien.cx/2019/06/13/exponential-notation-for-css-property-values-2/>
VANCOUVER
foobartel.com :: Stream | Sciencx - » Exponential Notation for CSS Property Values. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2019/06/13/exponential-notation-for-css-property-values-2/
CHICAGO
" » Exponential Notation for CSS Property Values." foobartel.com :: Stream | Sciencx - Accessed . https://www.scien.cx/2019/06/13/exponential-notation-for-css-property-values-2/
IEEE
" » Exponential Notation for CSS Property Values." foobartel.com :: Stream | Sciencx [Online]. Available: https://www.scien.cx/2019/06/13/exponential-notation-for-css-property-values-2/. [Accessed: ]
rf:citation
» Exponential Notation for CSS Property Values | foobartel.com :: Stream | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.