1.

How to apply stroke and fill color to text?

Answer»

The will-CHANGE property inform the browser which properties are expected to change via css or by javascript

  • HTML
<a class='DEMO' href='#'>Demo url</a>
  • CSS
.demo {   transition: opacity .2s;   opacity: 1;   font-family: Arial, Helvetica, Sans-serif;   font-size: 35px;   font-weight: bold;   color: black; } .demo:hover {   will-change: opacity; } .demo:active {   opacity: .2; }
  • DEMO:

The ANCHOR will appear as below. With the css declaration .demo:hover the browser has been informed in advance that opacity will change and set up optimizations in advance.
And when the hyperlink is clicked, the TEXT will have 20% opacity during the transition.



Discussion

No Comment Found