Phoenixz241
Deployment Pipeline Designer
2
MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1
500 XP
Sliding Text on Images with Bootstrap Templates
In this tutorial, we are going to learn on How To Create Sliding Text On Images. In this source code, we are going to display the text on its corresponding image with a background color after we hover the image.
In the example source code below, by using CSS and jQuery to appear the text effect on our images. Using jQuery slideToggle() we produce effect after we hover into the image.
You can try the Live Demo of this tutorial. Kindly click the button below.
⚙ Live Demo
Source Code:
CSS
This simple source code preparation for the background of the text sliding to the images. Kindly copy and paste to the HEAD tag of your simple web page.
slideToggle()
This is the script to have this kind of effect, with the function of slideToggle(). This script helps us to have the effect when the cursor hovers over the images the text with the background will show automatically in slow motion.
HTML
This is the codes where you can find the image with sliding text effect. But the effect is partially covered and it will be shown after we hover into the image. Kindly copy and paste this simple markup to your BODY tag of your web page.
⚙ Live Demo
Output
Note: For the effect, you can edit the CSS file after download the source code.
Download
In this tutorial, we are going to learn on How To Create Sliding Text On Images. In this source code, we are going to display the text on its corresponding image with a background color after we hover the image.
In the example source code below, by using CSS and jQuery to appear the text effect on our images. Using jQuery slideToggle() we produce effect after we hover into the image.
You can try the Live Demo of this tutorial. Kindly click the button below.
⚙ Live Demo
Source Code:
CSS
This simple source code preparation for the background of the text sliding to the images. Kindly copy and paste to the HEAD tag of your simple web page.
- <style style=
"text/css"
>
- .image_box
{
- float
:
left
;
- margin
:
20px
;
- position
:
relative
;
- color
:
#000
;
- }
- .image_box
.image_text
{
- display
:
none
;
- position
:
absolute
;
- bottom
:
0px
;
- padding
:
5px
;
- background
:
cornflowerblue
;
- width
:
150px
;
- opacity
:
0.8
;
- }
- </style>
slideToggle()
This is the script to have this kind of effect, with the function of slideToggle(). This script helps us to have the effect when the cursor hovers over the images the text with the background will show automatically in slow motion.
- <
script>
- $(
document)
.ready
(
function
(
)
{
- $(
'.image_box'
)
.hover
(
function
(
)
{
- $(
'.image_text'
,
this
)
.slideToggle
(
'moderate'
)
;
- }
,
function
(
)
{
- $(
'.image_text'
,
this
)
.slideToggle
(
'slow'
)
;
- }
)
;
- }
)
;
- </
script>
HTML
This is the codes where you can find the image with sliding text effect. But the effect is partially covered and it will be shown after we hover into the image. Kindly copy and paste this simple markup to your BODY tag of your web page.
- <h1
>
- Mouse over the Image to view the effect.
- </
h1
>
- <div
class
=
"image_box"
>
- <img
src
=
"image/5s.jpg"
/
>
- <div
class
=
"image_text"
>
- <h1
>
Image 1</
h1
>
- <h3
style
=
"color:white;"
>
Iphone 5s</
h3
>
- </
div
>
- </
div
>
- <div
class
=
"image_box"
>
- <img
src
=
"image/6.jpg"
/
>
- <div
class
=
"image_text"
>
- <h1
>
Image 2</
h1
>
- <h3
style
=
"color:white;"
>
Iphone 6</
h3
>
- </
div
>
- </
div
>
- <div
class
=
"image_box"
>
- <img
src
=
"image/6s.jpg"
/
>
- <div
class
=
"image_text"
>
- <h1
>
Image 3</
h1
>
- <h3
style
=
"color:white;"
>
Iphone 6s</
h3
>
- </
div
>
- </
div
>
⚙ Live Demo
Output

Note: For the effect, you can edit the CSS file after download the source code.
Download
You must upgrade your account or reply in the thread to view hidden text.