Step 1 : First open a HTML editor such as Notepad.
- Open start->Notepad.
- The name of editor is "Image".
Step 2 : Create a Folder on a desktop.
- Right-click on desktop->new->Folder.
- Name of folder is "Tom".
Step 3 : Open Visual Studio.
- Go to file -> New->Projects.
- Crete an ASP. NET Web Application.
- Name it "ImageSlide.aspx".
Step 4 : Add a HTML file to your web application.
- Right-click on Solution Explorer.
- Add->add new item->HTML form.
- The Name of the HTML form is "Html.html".
Step 5 : Now in this step we define a style that is applied on slider carousel images. In the <style> tag we define some properties. They are font-family, font-size and holder class.
Code
<style>
body
{
background-color:#ff99cc;
background-repeat:no-repeat;
overflow-x:hidden;
}
input#text {width:500px;}
input#range {}
textarea#text {width:500px; height:300px;}
img#zoom
{
border:10px solid #eee;
cursor:pointer;
-webkit-opacity:1.0;
-webkit-transition: all 0.2s ease-out;
-webkit-box-shadow: #333 0px 10px 10px;
}
div#zoom_container
{
position:absolute;
top:200px;
height: 250px;
width:1000px;
margin:0 auto;
z-index:1000;
display:none;
}
div#dummy img {display:none;}
div#container
{
height: 250px;
width:1000px;
margin: 75px auto;
-webkit-perspective: 700;
}
div#buttons
{
width:385px;
padding:7px 20px 0 20px;
position:relative;
margin:15px auto;
text-align:center;
background-color: rgba(200,200,200,0.3);
border:1px solid #aaa;
z-index:0;
-webkit-border-radius: 20px;
}
header
{
font-family: Sans-Serif;
font-size:12px;
text-align:center;
color: #ff99cc;
}
input[type="button"]{ font-size: 24px;}
input#range {
width:300px;
}
ul
{
width:100%;
list-style:none;
margin:0px auto;
-webkit-transform-style: preserve-3d;
}
li
{
-webkit-opacity: 1.0;
height:500px;
}
li.img
{
position:absolute;
-webkit-transition: all 0.3s ease-out;
-webkit-transform-origin: 50% 5%;
cursor:pointer;
}
</style>
Step 6 : Now in this step we create canvas elements and also define a shape of images of a regular square.
Code
var rxt = canvas.getContext('2d');
rxt.beginPath();
rxt.moveTo(radius, 0);
rxt.lineTo(canvas.width - radius, 0);
rxt.quadraticCurveTo(canvas.width, 0, canvas.width, radius);
rxt.lineTo(canvas.width, canvas.height - radius);
rxt.quadraticCurveTo(canvas.width, canvas.height, canvas.width - radius, canvas.height);
rxt.lineTo(radius, canvas.height);
rxt.quadraticCurveTo(0, canvas.height, 0, canvas.height - radius);
rxt.lineTo(0, radius);
rxt.quadraticCurveTo(0, 0, radius, 0);
rxt.clip();
rxt.drawImage(img, sx, sy, sw, sh, 0, 0, side, side);
$(canvas).click(coverflow.popup(img));
Step 7 : Now in this step we define a function that is used to show a popup of images.