Js slide tip code sharing, js slide code sharing
Examples of this article share the js sliding tip effect for your reference. The details are as follows:
Js Code has a nice animation effect. In the top right corner, the background color is red, and the font color is white. sliding up slowly and gradually disappears.
function tishi() { $("#tishi").attr("style", "border: 1px solid #000;position: absolute; z-index: 10; width:200px; height: 30px;color:white;background-color:Red;border-radius:25px;-moz-border-radius:25px; text-align:center;left:70%; top:10%; display: none"); $("#tishi").show().animate({ width: '300px', height: '37px', top: '-=10px' , opacity: '0.8' }, "slow"); $("#tishi").show().animate({ top: '-=10px' , opacity: '0.6' }, "slow"); $("#tishi").show().animate({ top: '-=10px' , opacity: '0.4' }, "slow"); $("#tishi").show().animate({ top: '-=10px' , opacity: '0.2' }, "slow"); $("#tishi").show().animate({ top: '-=10px' , opacity: '0.0' }, "slow"); }
Front-end code, written in the body:
<Div id = "tishi" style = "border: 1px solid #000; position: absolute; z-index: 10; width: 200px; height: 30px; color: white; background-color: Red; border-radius: 25px;-moz-border-radius: 25px;/* Old Firefox */text-align: center; left: 70%; top: 10%; display: none "> complete the information </div>
I hope this article will help you learn about javascript programming.
Articles you may be interested in:
- Javascript-like QQ sliding menu effect code
- Implementation of sliding fixed effects of the blog sidebar module following the scroll bar (js + jquery, etc)
- Javascript implementation code for sliding the slider to change the value
- An error is prompted when JavaScript events are dynamically bound to the Chrome extension page.
- Js uses the display style of the button to achieve the sliding effect of the button
- Native javascript imitates win8 wait prompt circle progress bar
- JavaScript code used to determine the horizontal and vertical screens and to disable the browser slide entries
- Before leaving the current page, use js to determine whether to exit the page as a condition prompt
- Use native js to encapsulate the sliding effect of webapp (Inertial sliding and sliding rebound)
- Js implements touch mobile touch screen sliding events