Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- .p_text {
- position: relative;
- top: -9px;
- border: 0;
- transition: all 40ms linear;
- margin-top: 10px;
- margin-bottom: 10px;
- margin-left: 2px;
- margin-right: 2px;
- color: #721c24;
- padding: 15px;
- font-weight: bold;
- border-radius: 5px;
- border: 1px #f5c6cb solid;
- box-shadow: 0 4px 13px rgba(255, 113, 113, 0.5) !important;
- }
- .p_border_r {
- background-color: rgba(255, 255, 255, 0.8);
- border-radius: 5px;
- z-index: 2;
- background: linear-gradient(45deg, rgba(255, 160, 160, 0.301) 0%, rgba(250, 135, 135, 0.315) 20%, transparent 20.3%, transparent 80%, rgba(255, 190, 190, 0.5) 80.3%)
- }
- .p_border_r::after {
- content: '';
- position: absolute;
- z-index: -1;
- left: 6px;
- top: 6px;
- width: calc(100% - 12px);
- height: calc(100% - 12px);
- background: #f8d7da;
- border-radius: 5px;
- }
- </style>
- <div class="magick p_text p_border_r">
- <span class="font-weight-bold" style="font-size: 16px;">ระวัง!</span> ในบิลของท่านมีเลขดัง
- ยอดจ่ายจะปรับเปลี่ยนไปตามความเหมาะสม</div>
- <script>
- $(document).ready(function () {
- var grad = $('.p_border_r').css('background');
- var deg = 45;
- var lastms = 0;
- var animate = true;
- var callback = function (time) {
- if (lastms == 0) {
- lastms = time;
- }
- deg = (deg + (time - lastms) * 0.3);
- lastms = time;
- while (deg > 360) {
- deg -= 360;
- }
- var newCss = grad.replace('45deg', deg + 'deg');
- $('.p_border_r').css('background', newCss);
- if (animate) {
- window.requestAnimationFrame(callback);
- } else {
- lastms = 0;
- }
- };
- window.requestAnimationFrame(callback);
- })
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement