score:1
Accepted answer
the solution is to use css "breathing" animation. an example how it works:
#breathing-button {
width: 270px;
padding: 20px;
margin: 50px auto;
border: 1px solid #d1d1d1;
-webkit-animation: breathing 7s ease-out infinite normal;
animation: breathing 7s ease-out infinite normal;
font-size: 24px;
background: #5885cb;
color: #fff;
-webkit-font-smoothing: antialiased;
border-radius: 3px;
text-align: center;
}
@-webkit-keyframes breathing {
0% {
-webkit-transform: scale(0.9);
transform: scale(0.9);
}
25% {
-webkit-transform: scale(1);
transform: scale(1);
}
60% {
-webkit-transform: scale(0.9);
transform: scale(0.9);
}
100% {
-webkit-transform: scale(0.9);
transform: scale(0.9);
}
}
@keyframes breathing {
0% {
-webkit-transform: scale(0.9);
-ms-transform: scale(0.9);
transform: scale(0.9);
}
25% {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
60% {
-webkit-transform: scale(0.9);
-ms-transform: scale(0.9);
transform: scale(0.9);
}
100% {
-webkit-transform: scale(0.9);
-ms-transform: scale(0.9);
transform: scale(0.9);
}
}
<div id="breathing-button">breathing button</div>
Source: stackoverflow.com
Related Query
- How to zoom in and out an image every second?
- Zoom in and out on image in React.js
- How to change image and background color every x seconds. React
- How to implement zoom to specific country and zoom in and out when using mouse scroll wheel together in datamap?
- Hover over div/image to fade out image and have text fade in, but hovering over text removes fade out of image. How to prevent?
- How to zoom in and zoom out on canvas using button in konvajs react
- How to change image every second in map react
- How to make a background Image span the entire div and zoom in, in react.js?
- How to change font color for part of text every second using react and javascript?
- how to stop zoom in and zoom out in react?
- How to set image width to be 100% and height to be auto in react native?
- How to detect when a image is loaded, that is provided via props, and change state in React?
- How do I store JWT and send them with every request using react
- How to slide <View/> in and out from the bottom in React Native?
- How do I set profile image as first letters of first and last name?
- How to mirror and resize the part of image with fixed width and height
- How to prevent Gatsby image from blurring a logo with every reload?
- How to display every image inside an image folder in react
- How to send image from image Uri through HTTP request? (React Native and Django Backend)
- How to upload image using ReactJS and save into local storage?
- Is it too expensive to add and remove event listeners on every call of my React custom hook? How to avoid it?
- How to Zoom out in WebView in react-native?
- how to change image src using props with styled component and react
- How to upload image using javascript fetch api and express multer
- How to get image height and width from uri on React Native?
- How to click an image and make a rotation
- How to make the background image change every X seconds in React?
- In React and React Router, how to display a header on every page except home page
- How to display an image in full screen background using reactJS and css?
- How to import svg files and use them for src in image
More Query from same tag
- Importing FontAwesome icons by string array in React.js
- Creating a smarter Webpack autoloader for React components (nested in their directories)
- Unable to get values form child to parent -Reactjs Redux
- AWS JS SDK TypeError: STS is not a constructor
- How to list a property of firebase object as an array?
- Refresh Component on route parameter change
- Why styles don't update when saving the files in Tailwind CSS JIT mode and I need to restart the server?
- deploy multiple react projects on a single domain
- why filtering state array with react hooks doesn't work but filtering original array does
- Use React Toast Notification in class component
- send a websocket message in a route, Express.js
- How to prevent re-render of entire list on addition of new element in React
- Fade one element out while fade in background element on hover
- How to dynamically add/delete view in react native?
- Unable to obtain correct parameter for React JSX action
- react hook cant perform setstate in an unmounted component
- a function for data filtration based on two arrays of strings in Javascript
- How to call API request for each key of a JSON Object separately in REACT JS by loop?
- react node passing file through axios with multer error 500
- .bind(this) in coffee-react
- react typescript component set prop with condition
- webpack module build fails when attempting to upgrade from Babel 6 to Babel 7
- React Typescript type a void function
- react js playing local MP3 file
- Reactjs rerender component after CRUD Operation
- Why are my GlobalStyles not working after deploying with styled components?
- Save base64 data into a variable
- Flex-direction: reverse column hides navigation component
- Using recursive function to iterate over nested object, returns undefined
- React: Set a path as landing page