Thursday, September 14, 2023
HomeCSSjavascript - Just how to accomplish a smooth opacity lower?

javascript – Just how to accomplish a smooth opacity lower?


I have several aspects, which are not in a container, as well as I can not place them right into a container neither. As an example:

<< div course=" code-line">> Code line 1<.
<< div course=" code-line">> Code line 2<.
<< div course=" code-line">> Code line 3<.
<< div course=" code-line">> Code line 4<.
<< div course=" code-line">> Code line 5<.
<< div course=" code-line">> Code line 6<.
<< div course=" code-line">> Code line 7<.
<< div course=" code-line">> Code line 8<.
<< div course=" code-line">> Code line 9<.
<< div course=" code-line">> Code line 10<.

With some marginal css:

 code-line {
background-color: #e 9dfba;
}

Just how might I accomplish that the opacity is reduced on the last 4-5 lines as well as it has a continual result. Something comparable such as this:.
enter image description here

Concerning line 12, it obtains a little bit much less noticeable, as well as it continues to the last line it is hardly visisble.

The most effective I might do, is to establish the opacity on the lines (0.8, 0.6, 0.4, 0.2), however it is not smooth, since the straight lines (the distinction in opacity in between the aspects) can be seen (it is hardly noticeable on the image, however it is absolutely a lot more noticeable on the display):

enter image description here

.

RELATED ARTICLES

Most Popular

Recent Comments