Are you tired of that dull boring images on your blog? Why don't you give CSS3 transition effect a try?
Transition effect is one of the new CSS3 features which allow web developer to create a hover effect between two element. You can't imagine how effective transition effect is, and how site visitors get attracted to it, until you test them out and watch lots of buzz from people asking you for a way of doing that.
In this tutorial, we will be discussing on how you can apply a simple white transparent background which will flash through your blog image's on hover within a specified time.
The HTML Markup
We will be using two div tag, the first div wraps the main image we want to apply the shine effect to, while the second div wraps the shine effect tag.
<div class="image-shine">
<img src="IMAGE-URL" />
<div class="hover-shine"></div>
</div>
<img src="IMAGE-URL" />
<div class="hover-shine"></div>
</div>
The CSS Markup
Now, we will create CSS for the shine effect. In which the width and height must be placed at 100% and the effect will start from the top right corner of the image.
.image-shine{
width: 250px;
height: 250px;
position: relative;
}
.hover-shine{
width:100%; height: 100%;
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPCqGWx5PVFTcAj63lwx9ZdXOx-c_uWzVEsHIQ0ewniQV0LGU4kwafWhjpzD2xefuBQKErnTQwsox5mw1MCPc7zV-UEYn1UiYRHbqCzMKOVe3mt1gfl-vhO6c8nVYe15Mz9OGXCbbi0kQU/s1600/shine.png);
position: absolute;
/*Posicion inicial del shine*/
background-position: -260px 0;
left:0px; top:0px;
background-repeat:no-repeat;
}
width: 250px;
height: 250px;
position: relative;
}
.hover-shine{
width:100%; height: 100%;
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPCqGWx5PVFTcAj63lwx9ZdXOx-c_uWzVEsHIQ0ewniQV0LGU4kwafWhjpzD2xefuBQKErnTQwsox5mw1MCPc7zV-UEYn1UiYRHbqCzMKOVe3mt1gfl-vhO6c8nVYe15Mz9OGXCbbi0kQU/s1600/shine.png);
position: absolute;
/*Posicion inicial del shine*/
background-position: -260px 0;
left:0px; top:0px;
background-repeat:no-repeat;
}
We specify -260px for the shine background position to the left, so as to prevent it from appearing on the main image before the hover.
The transition effect works upon three values. The first is the element that the transition is applied to, that in our case will be background-position; the second parameter that receives the transition effect is the time taken for the shine background to shine through the main image in seconds, and the third parameter is the transition type that can be: linear, bounce, ease, ease-in, ease-out, ease in-out.
-webkit-transition: background-position .4s ease;
-moz-transition: background-position .4s ease;
-o-transition: background-position .4s ease;
transition: background-position .4s ease;
-moz-transition: background-position .4s ease;
-o-transition: background-position .4s ease;
transition: background-position .4s ease;
Now, we specify the shine background position after placing the cursor on the image (hover), but will return to its initial position (-260px) after removing the cursor.
.hover_shine:hover{
background-position: 250px 0;
}
background-position: 250px 0;
}
Putting Them All Together
I think you should now understand how the transition effect is been formed? Putting all the code together, the final code will look as follow:
<style>
.image-shine{
width: 250px;
height: 250px;
position: relative;
}
.hover-shine{
width:100%; height: 100%;
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPCqGWx5PVFTcAj63lwx9ZdXOx-c_uWzVEsHIQ0ewniQV0LGU4kwafWhjpzD2xefuBQKErnTQwsox5mw1MCPc7zV-UEYn1UiYRHbqCzMKOVe3mt1gfl-vhO6c8nVYe15Mz9OGXCbbi0kQU/s1600/shine.png);
position: absolute;
/*Posicion inicial del shine*/
background-position: -260px 0;
left:0px; top:0px;
background-repeat:no-repeat;
-webkit-transition: background-position .4s ease;
-moz-transition: background-position .4s ease;
-o-transition: background-position .4s ease;
transition: background-position .4s ease;
}
.hover-shine:hover{
background-position: 250px 0;
}
</style>
<div class="image-shine">
<img src="IMAGE-URL" />
<div class="hover-shine"></div>
</div>
.image-shine{
width: 250px;
height: 250px;
position: relative;
}
.hover-shine{
width:100%; height: 100%;
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPCqGWx5PVFTcAj63lwx9ZdXOx-c_uWzVEsHIQ0ewniQV0LGU4kwafWhjpzD2xefuBQKErnTQwsox5mw1MCPc7zV-UEYn1UiYRHbqCzMKOVe3mt1gfl-vhO6c8nVYe15Mz9OGXCbbi0kQU/s1600/shine.png);
position: absolute;
/*Posicion inicial del shine*/
background-position: -260px 0;
left:0px; top:0px;
background-repeat:no-repeat;
-webkit-transition: background-position .4s ease;
-moz-transition: background-position .4s ease;
-o-transition: background-position .4s ease;
transition: background-position .4s ease;
}
.hover-shine:hover{
background-position: 250px 0;
}
</style>
<div class="image-shine">
<img src="IMAGE-URL" />
<div class="hover-shine"></div>
</div>
Some interesting tutorials you might like:
- Add CSS3 Transition Effect To Drop Down Menu
- Add Zoom Effect To Your Blog Images On Mouse Hover
- How To Add Spinning Or Rotating Effect To Your Blog Images
Subscribe For Free Updates!
*Please confirm the email sent to your inbox after clicking "Sign Up!".
you can do it now just use CSS ... http://cdpn.io/HvIqx
ReplyDeletenice blog bro, nice to meet you ^_^
easy pumpkin carving ideas
ReplyDeletecool pumpkin carving ideas
cute pumpkin carving ideas
creative pumpkin carving ideas
funny pumpkin carving ideas
halloween pumpkin carving ideas
scary pumpkin carving ideas
good pumpkin carving ideas
unique pumpkin carving ideas
simple pumpkin carving ideas
pumpkin carving patterns
simple pumpkin carving ideas
pumpkin carving designs
cool pumpkin carvings ideas
carving pumpkin ideas
pumpkin carvings ideas
pumpkin carving ideas pictures
pumpkin carving ideas for kids
pumpkin carving idea
carved pumpkin ideas
carving pumpkins ideas
Hotmail is an email account of Microsoft Corporation. Like Google's Gmail, it is full of features usually xuyen.Neu of an email you want to register an account please follow these basic steps:
ReplyDeleteHotmail login
Hotmail review
Sign in to hotmail
Login to hotmail
Recover hotmail password
Tank Trouble is a very interesting flash game about tanks, about war and about destruction
TANK TROUBLE | TANK TROUBLE 2
One Penguin Takes it personally when he is surfing the web and stumbles upon a web site telling him that he cant fly, after that he sets his mind to research and practice flying until he can prove the world that he can..
IO GAMES | Slitherio | LEARN TO FLY | LEARN TO FLY 2
Strike Force Heroes is a new game action-packed shooter from the creators of Raze; with 3 game modes, 15 campaign missions and over 65 weapons.
Strike Force Heroes 4
Strike Force Heroes
Its more informative and interesting article, we can lean many useful topic here.
ReplyDeleteHow to Get top Call Girls Service
thank your contributions are recorded in the article! I learned a lot.
ReplyDeletethanks for the article, I'm always follow you!
follow me on : Abcya Games
Enjoy music after hours of strenuous work is my hobby, my music brought more positive thoughts, help me always optimistic
ReplyDeletebaixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas, baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas
Thanks I have read your article, it is very interesting and exciting
ReplyDeletedr driving, dr driving, dr driving , dr driving, dr driving , dr driving , dr driving, dr driving , dr driving, dr driving , dr driving, dr driving
happy diwali sms and messages in english
ReplyDeletediwali pictures images 2016 hd
Happy Diwali Quotes
Happy Diwali Quotes
This is an awesome post. Really very informative and creative contents. These concept is a good way to enhance the knowledge. Excellent post.
ReplyDeleteOur Digital Marketing Training is tailored for beginners who want to learn how to stand out digitally, whether it is for their own business or a personal brand.
Digital Marketing Training in Chennai
Digital Marketing Course in Chennai
Digital Marketing Courses in Chennai
SEO Training in Chennai
What is Digital Marketing
Digital Marketing
SEO Services in India
CHSL Result
ReplyDeleteSSC CHSL Result
SSC CHSL Result Name Wise
CHSL Result 2017
CHSL Result Region Wise
CHSL Result Name Wise
HBSE Result 2017
HBSE 10th Result
HBSE Matric Result
Haryana Board Result
Haryana 10th Class Result
HBSE Bhiwani Board Result
HBSE Class 10 Result
HBSE Board Results
Telangana Eamcet Result
Manabadi TS Eamcet Result
Sakshi/Eenadu TS Eamcet Result
TS Eamcet Result
TS Eamcet Result 2017
TS Eamcet Rank Card
TS Eamcet Merit List
TS Eamcet Final Key
AP Eamcet Result
Andhra Pradesh EAMCET Result
Manabadi Eamcet Result AP
School9, Sakshi Eamcet Result AP
AP Eamcet Result 2017
AP Eamcet Rank Card
AP Eamcet Merit List
AP Eamcet Result Date
AP Eamcet Final Key
Karnataka PUC Result
Karnataka 2nd PUC Result
Karnataka PUC Results 2017
KSEEB PUC Result
Karnataka PUC Exam Result
Karnataka 12th PUC Result 2017
Karnataka 12th PUC Result 2017
I can feel that the articles contained in this blog is so interesting. I also get a variety informasin, thanks.
ReplyDeleteobat penghilang mioma uteri tradisional
coin haber - koin haber - kripto para haberleri - coin haber - instagram video indir - instagram takipçi satın al - instagram takipçi satın al - tiktok takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - instagram beğeni satın al - instagram beğeni satın al - google haritalara yer ekleme - btcturk güvenilir mi - binance hesap açma - kuşadası kiralık villa - tiktok izlenme satın al - instagram takipçi satın al - sms onay - paribu sahibi - binance sahibi - btcturk sahibi - paribu ne zaman kuruldu - binance ne zaman kuruldu - btcturk ne zaman kuruldu - youtube izlenme satın al - torrent oyun - google haritalara yer ekleme - altyapısız internet - bedava internet - no deposit bonus forex - erkek spor ayakkabı - tiktok jeton hilesi - tiktok beğeni satın al - microsoft word indir - misli indir - instagram takipçi satın al
ReplyDeleteMMORPG OYUNLAR
ReplyDeleteİNSTAGRAM TAKİPÇİ SATİN AL
Tiktok Jeton Hilesi
Tiktok Jeton Hilesi
antalya saç ekimi
INSTAGRAM TAKİPCİ
İnstagram takipçi satın al
metin pvp
ınstagram takipçi satın al
kartal mitsubishi klima servisi
ReplyDeleteümraniye mitsubishi klima servisi
beykoz vestel klima servisi
tuzla vestel klima servisi
tuzla bosch klima servisi
tuzla arçelik klima servisi
çekmeköy samsung klima servisi
ataşehir samsung klima servisi
çekmeköy mitsubishi klima servisi
en son çıkan perde modelleri
ReplyDeletenft nasıl alınır
yurtdışı kargo
uc satın al
özel ambulans
en son çıkan perde modelleri
minecraft premium
lisans satın al