All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
#New Year's Resolutions for the Burgeoning Self-Taught Female Hacker
Last January, I attended my first hackathon and commited to learning to code. Fast forward to May, and I landed my first full-time position as a Developer.
When people ask me how I did it, I always say that the most challenging aspect of a career transition is psychological. The technical learning can be done with elbow grease, but no career transition is possible without psychological fortitude.
Along the way, there will be self-doubt, hundreds of rejected job applications, cold recruiters, and days when you feel like your goal is too far beyond your reach. To this, I say: you can do it.
So in light of the new year, I've put together a non-prescriptive list to inspire your 2014 resolutions. If you are a burgeoning self-taught female hacker: you go, girl.
@-webkit-keyframes rainbow { | |
0% {border-color: hsl(0, 100%, 50%);} | |
100% {border-color: hsl(255, 100%, 50%);} | |
} | |
.rainbow_border{ | |
border: 4px solid hsl(0, 100%, 50%); | |
-webkit-animation: rainbow 5s infinite alternate; | |
} |