Home>
I would like to use @keyframes and animation to add a background color that moves by the length of the text, but if I specify the length (width) as a percentage, the text will stick out when shrinking responsively The
. animation-duration-1s p {
width: 100%;
height: auto;
background: # 00619a;
animation-name: animation-text;
animation-duration: 1s;
animation-timing-function: linear;
animation-delay: 0s;
animation-iteration-count: 1;
animation-direction: normal;
animation-fill-mode: forwards;
text-align: left;
/ * display: inline-block;* /
@keyframes animation-text {
0% {width: 100px;}
100% {width: 50%;}
}
}
How can I make the @keyframes length specification follow the variable text width?
I would like to implement an action that moves the yellow line of "What can I do because it is a nice day"?
Sample site
Can I just use @keyframes to make it look like the above site?
-
Answer # 1
Related articles
- css3 - keyframe animation is introduced, but the background can be cut off
- css3 - i want to change the background color except for a specific class
- css3 - i want to eliminate a little background color below the image
- Example of background color gradient animation effect implemented by jQuery
- javascript change the background color according to the displayed characters
- css3 - svg i want to make the start time of the border animation earlier
- php processing png image white background color changed to transparent color example code
- Detailed Python to change the background color of photos (blue background to red background)
- js set the mouse hover to change the background color
- Detailed process of setting the background color of Word pages through Java
- Java how to set the background color of PDF documents
- Implementation of matplotlib conditional background color in python
- Python xlwt how to set a custom background color for a cell
- html - i want to hide the border color with the background color
- can the background color of some cells (columns) be set in wpf listview?
- html - i want to add a background color to the navigation menu
- [html/css] header does not have background color
- wpf - i want to do textwrapping and background color at the same time in listview
- Remove the partial background color of the mybatis configuration file in IDEA (illustration)
- php - i want to change the background color and text color when creating a multiplication table
Trends
It seems that the link destination is not the background color, but the after pseudo-element is moved over the text.
Moving sample