Shine
How do I make an shine?
What is a shine? How do you make a shine? This script and codes were developed by Ana on 26 December 2022, Monday.
Shine - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>shine</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<html > <head> <meta charset="UTF-8">
<title>Demo of Apple TV Poster Parallax Effect - Designmodo</title>
<meta name="description" content="In this tutorial we'll guide you how to create a similar Apple TV parallax effect using CSS3, HTML and some jQuery."/>
<meta name="keywords" content="parallax, jquery, css3"/>
<link rel="canonical" href="https://designmodo.com/demo/apple-tv-parallax/" />
<link rel="publisher" href="https://www.google.com/+Designmodo"/>
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Demo of Apple TV Poster Parallax Effect - Designmodo" />
<meta property="og:description" content="In this tutorial we'll guide you how to create a similar Apple TV parallax effect using CSS3, HTML and some jQuery." />
<meta property="og:url" content="https://designmodo.com/demo/apple-tv-parallax/" />
<meta property="og:site_name" content="Designmodo" />
<meta property="article:publisher" content="https://www.facebook.com/designmodo" />
<meta property="fb:app_id" content="368289576549864" />
<meta property="og:image" content="https://designmodo.com/demo/apple-tv-parallax/apple-tv-poster.gif" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:description" content="In this tutorial we'll guide you how to create a similar Apple TV parallax effect using CSS3, HTML and some jQuery."/>
<meta name="twitter:title" content="Demo of Apple TV Poster Parallax Effect - Designmodo"/>
<meta name="twitter:site" content="@designmodo"/>
<meta name="twitter:domain" content="Designmodo"/>
<meta name="twitter:image" content="https://designmodo.com/demo/apple-tv-parallax/apple-tv-poster.gif"/>
<meta name="twitter:creator" content="@designmodo"/>
<meta itemprop="image" content="https://designmodo.com/demo/apple-tv-parallax/apple-tv-poster.gif"> <link rel="stylesheet" href="css/reset.css"> <link rel="stylesheet" href="css/style.css"> </head> <body>
<div data-offset="5" class="poster"> <div class="shine"></div> <div data-offset="-2" class="layer-1"></div> <div class="layer-2"></div> <div data-offset="1" class="layer-3"></div> <div data-offset="3" class="layer-4"></div> <div data-offset="10" class="layer-5"></div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script> </body>
</html> <script src="js/index.js"></script>
</body>
</html>
Shine - Script Codes CSS Codes
body, html { height: 100%; min-height: 100%; }
body {
background: linear-gradient(to bottom, #f6f7fc 0%,#d5e1e8 40%);
transform-style: preserve-3d;
transform: perspective(800px);
}
.poster {
width: 320px;
height: 500px;
position: absolute;
top: 50%; left: 50%;
margin: -250px 0 0 -160px;
border-radius: 5px;
box-shadow: 0 45px 100px rgba(0, 0, 0, 0.4);
overflow:hidden;
}
.layer-1 {
background-image: url('https://designmodo.com/demo/apple-tv-parallax/images/1.png');
}
.layer-2 {
background-image: url('https://designmodo.com/demo/apple-tv-parallax/images/2.png');
}
.layer-3 {
top: 0; bottom: 0;
left: 0; right: 0;
background-image: url('https://designmodo.com/demo/apple-tv-parallax/images/3.png');
}
.layer-4 {
background-image: url('http://img11.deviantart.net/f73f/i/2013/206/7/b/tree_2_png___by_alzstock-d6f1c4r.png');
}
.layer-5 {
background-image: url('https://designmodo.com/demo/apple-tv-parallax/images/5.png');
}
div[class*="layer-"] {
position: absolute;
top: -10px; left: -10px;
right: -10px; bottom: -10px;
background-size: 100% auto;
background-repeat: no-repeat;
background-position: 0 0;
transition:0.1s;
}
.shine {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: linear-gradient(90deg, rgba(255,255,255,.5) 0%,rgba(255,255,255,0) 60%);
z-index: 100;
}
Shine - Script Codes JS Codes
/** * Designed by @Konstantine Trundayev * https://dribbble.com/k0t * Coded by @Balaj Marius for @Designmodo * http://mariusbalaj.com | https://designmodo.com */
var $poster = $('.poster'), $shine = $('.shine'), $layer = $('div[class*="layer-"]'), w = $(window).width(), //window width h = $(window).height(); //window height
$(window).on('mousemove', function(e) { var offsetX = 0.5 - e.pageX / w, //cursor position X offsetY = 0.5 - e.pageY / h, //cursor position Y dy = e.pageY - h / 2, //@h/2 = center of poster dx = e.pageX - w / 2, //@w/2 = center of poster theta = Math.atan2(dy, dx), //angle between cursor and center of poster in RAD angle = theta * 180 / Math.PI - 90, //convert rad in degrees offsetPoster = $poster.data('offset'), transformPoster = 'translateY(' + -offsetX * offsetPoster + 'px) rotateX(' + (-offsetY * offsetPoster) + 'deg) rotateY(' + (offsetX * (offsetPoster * 2)) + 'deg)'; //poster transform //get angle between 0-360 if (angle < 0) { angle = angle + 360; } //gradient angle and opacity $shine.css('background', 'linear-gradient(' + angle + 'deg, rgba(255,255,255,' + e.pageY / h + ') 0%,rgba(255,255,255,0) 80%)'); //poster transform $poster.css('transform', transformPoster); //parallax foreach layer $layer.each(function() { var $this = $(this), offsetLayer = $this.data('offset') || 0, transformLayer = 'translateX(' + offsetX * offsetLayer + 'px) translateY(' + offsetY * offsetLayer + 'px)'; $this.css('transform', transformLayer); });
});
Developer | Ana |
Username | ARocketfish |
Uploaded | December 26, 2022 |
Rating | 3 |
Size | 3,255 Kb |
Views | 18,216 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
2 Blocks Test | 43,026 Kb |
A Pen by Ana | 1,898 Kb |
Motorlease | 3,688 Kb |
Motorlease - version 2 | 3,844 Kb |
MOCKUP | 97,845 Kb |
Magnus 3 | 7,944 Kb |
Video | 7,880 Kb |
CVS Email Preview | 4,400 Kb |
Magnus 4 | 7,982 Kb |
Test2 | 2,269 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Spiralator 9000 | AdmiralPotato | 4,671 Kb |
Comment Jquery | SquishyAndroid | 2,421 Kb |
CSS Bot Confusion | Jpod | 3,456 Kb |
RollOver Effect 2 | Lmack90 | 2,162 Kb |
JS Beispiel getElementsByClassName 3 | HSZG-Frontend-Kurs | 1,988 Kb |
Pure CSS Torch Light | Juliendargelos | 2,727 Kb |
Apple website | Jds317 | 1,835 Kb |
Main page display | BarryKe | 4,562 Kb |
GLSL Hills | Ykob | 6,991 Kb |
SCSS Social Icons Flat | Mattsince87 | 3,482 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!