<!-- Add jQuery and xZoom -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/xzoom/dist/xzoom.min.js"></script>
<script>
$(function () {
$(".xzoom").xzoom({
option
});
});
</script>
<img class="xzoom" src="photo-thumbnail.jpg" xoriginal="photo-original.jpg" />
Property | Type | Default | Description |
---|---|---|---|
position | String | right | Position of zoom output window, one of the next properties is available "top", "left", "right", "bottom", "inside", "lens", "#ID". |
mposition | String | inside | Position of zoom output window in adaptive mode (i.e. for mobile devices) available properties: "inside", "fullscreen" |
rootOutput | Boolean | true | In the HTML structure, this option gives an ability to output xzoom element, to the end of the document body or relative to the parent element of main source image. |
Xoffset | Number | 0 | Zoom output window horizontal offset in pixels from output base position. |
Yoffset | Number | 0 | Zoom output window vertical offset in pixels from output base position. |
fadeIn | Boolean | true | Fade in effect, when zoom is opening. |
fadeTrans | Boolean | true | Fade transition effect, when switching images by clicking on thumbnails. |
fadeOut | Boolean | false | Fade out effect, when zoom is closing. |
smoothZoomMove | Number | 3 | Smooth move effect of the big zoomed image in the zoom output window. The higher value will make movement smoother. |
smoothLensMove | Number | 1 | Smooth move effect of lens. |
smoothScale | Number | 6 | Smooth move effect of scale. |
defaultScale | Number | 0 | You can setup default scale value of zoom on opening, from -1 to 1. Where -1 means -100%, and 1 means 100% of lens scale. |
scroll | Boolean | true | Scale on mouse scroll. |
tint | false or String | false | Tint color. Color must be provided in format like "#color". We are not recommend you to use named css colors. |
tintOpacity | Number | 0.5 | Tint opacity from 0 to 1. |
lens | false or String | false | Lens color. Color must be provided in format like "#color". We are not recommend you to use named css colors. |
lensOpacity | Number | 0.5 | Lens opacity from 0 to 1. |
lensShape | 'box' or 'circle' | box | Lens shape "box" or "circle". |
lensCollision | Boolean | true | Lens will collide and not go out of main image borders. This option is always false for position "lens". |
lensReverse | Boolean | false | When selected position "inside" and this option is set to true, the lens direction of moving will be reversed. |
zoomWidth | 'auto' or Number | auto | Custom width of zoom window in pixels. |
zoomHeight | 'auto' or Number | auto | Custom height of zoom window in pixels. |
sourceClass | String | xzoom-source | Class name for source "div" container. |
loadingClass | String | xzoom-loading | Class name for loading "div" container that appear before zoom opens, when image is still loading. |
lensClass | String | xzoom-lens | Class name for lens "div". |
zoomClass | String | xzoom-preview | Class name for zoom window(div). |
activeClass | String | xactive | Class name that will be added to active thumbnail image. |
hover | Boolean | false | With this option you can make a selection action on thumbnail by hover mouse point on it. |
adaptive | Boolean | true | Adaptive functionality. |
adaptiveReverse | Boolean | false | Same as lensReverse, but only available when adaptive is true. |
title | Boolean | false | Output title/caption of the image, in the zoom output window. |
titleClass | String | xzoom-caption | Class name for caption "div" container. |
bg | Boolean | false | Zoom image output as background, works only when position is set to "lens". |
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Add jQuery and xZoom -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/xzoom/dist/xzoom.min.js"></script>
<title>xZoom</title>
<style>
img[xoriginal] {
border: 1px solid #272727;
}
.xzoom-thumbs a {
text-decoration: none;
}
/* Preview */
.xzoom-preview {
border: 1px solid #888;
background: #2f4f4f;
box-shadow: -0px -0px 10px rgba(0, 0, 0, 0.50);
}
/* Lens */
.xzoom-lens {
border: 1px solid #555;
box-shadow: -0px -0px 10px rgba(0, 0, 0, 0.50);
cursor: crosshair;
}
/* Loading */
.xzoom-loading {
background-position: center center;
background-repeat: no-repeat;
border-radius: 100%;
opacity: .7;
background: url(images/xloading.gif);
width: 48px;
height: 48px;
}
.xzoom-2-1 {
margin: 0 0 0 auto;
display: block;
}
#zoom-target {
max-width: 640px;
width: 100%;
height: 480px;
margin: 15px 0;
border: 1px solid #272727;
background: #afafaf;
}
</style>
</head>
<body>
<header>
<h1 class="dlw-title">xZoom</h1>
<p class="dlw-description">xZoom is a jQuery plug-in that shows a zoom preview of the image.
<br>It is possible to customize the preview position and zoom.</p>
</header>
<section>
<h2 class="dlw-subtitle">[1] Default</h2>
<p>When you mouse over the image, zoom preview it to the right.
<br>Scrolling on the image also changes the zoom ratio.</p>
<script>
$(function () {
$('.xzoom-1').xzoom();
});
</script>
<div class="zoom-box">
<img class="xzoom-1" src="images/photo01-s.jpg" xoriginal="images/photo01.jpg" />
</div>
</section>
<section>
<h2 class="dlw-subtitle">[2] Position and Offset</h2>
<h3 class="dlw-lead">Left & Xoffset</h3>
<p>Show the preview with a gap open on the left.</p>
<script>
$(function () {
$('.xzoom-2-1').xzoom({
position: 'left',
Xoffset: -30
});
});
</script>
<div class="zoom-box">
<img class="xzoom-2-1" src="images/photo01-s.jpg" xoriginal="images/photo01.jpg" />
</div>
<h3 class="dlw-lead">Fullscreen</h3>
<p>Show preview in full screen.</p>
<script>
$(function () {
$('.xzoom-2-2').xzoom({
position: 'fullscreen'
});
});
</script>
<div class="zoom-box">
<img class="xzoom-2-2" src="images/photo01-s.jpg" xoriginal="images/photo01.jpg" />
</div>
<h3 class="dlw-lead">Lens Shape</h3>
<p>Change the shape of the lens to a circle and zoom on the image.</p>
<script>
$(function () {
$('.xzoom-2-3').xzoom({
position: 'lens',
lensShape: 'circle',
zoomWidth: 500,
zoomHeight: 500
});
});
</script>
<div class="zoom-box">
<img class="xzoom-2-3" src="images/photo01-s.jpg" xoriginal="images/photo01.jpg" />
</div>
<h3 class="dlw-lead">Specify #ID</h3>
<p>Show preview on specified ID element.</p>
<script>
$(function () {
$('.xzoom-2-4').xzoom({
position: '#zoom-target'
});
});
</script>
<div class="zoom-box">
<img class="xzoom-2-4" src="images/photo01-s.jpg" xoriginal="images/photo01.jpg" />
</div>
<div id="zoom-target"></div>
</section>
<section>
<h2 class="dlw-subtitle">[3] Tint & Lens Color</h2>
<p>Changes the image, lens color and transparency when mouse over the image.</p>
<script>
$(function () {
$('.xzoom-3').xzoom({
tint: '#000',
tintOpacity: 0.3,
lens: '#f00',
lensOpacity: 0.3
});
});
</script>
<div class="zoom-box">
<img class="xzoom-3" src="images/photo01-s.jpg" xoriginal="images/photo01.jpg" />
</div>
</section>
<section>
<h2 class="dlw-subtitle">[4] Scroll Zoom</h2>
<p>By default, you can zoom by scrolling on the image. Here we are turning it off.</p>
<script>
$(function () {
$('.xzoom-4').xzoom({
scroll: false
});
});
</script>
<div class="zoom-box">
<img class="xzoom-4" src="images/photo01-s.jpg" xoriginal="images/photo01.jpg" />
</div>
</section>
<section>
<h2 class="dlw-subtitle">[5] Gallery</h2>
<p>Preview on multiple images.</p>
<script>
$(function () {
$('.xzoom-5, .xzoom-gallery').xzoom();
});
</script>
<img class="xzoom-5" src="images/photo01-s.jpg" xoriginal="images/photo01.jpg" />
<div class="xzoom-thumbs">
<a href="images/photo01.jpg">
<img class="xzoom-gallery" width="120" src="images/photo01-s.jpg">
</a>
<a href="images/photo02.jpg">
<img class="xzoom-gallery" width="120" src="images/photo02-s.jpg">
</a>
<a href="images/photo03.jpg">
<img class="xzoom-gallery" width="120" src="images/photo03-s.jpg">
</a>
<a href="images/photo04.jpg">
<img class="xzoom-gallery" width="120" src="images/photo04-s.jpg">
</a>
</div>
</section>
</body>
</html>
Here, design samples of various effects to text are posted.
The headline is the text indicating the nature of the article below it.
Here, design samples of headline using style sheets are posted.
The HTML <ol> element represents an ordered list of items.
Here, design samples of ol using style sheets are posted.
The HTML <hr> element represents a thematic break between paragraph-level elements.
Here, design samples of hr using style sheets are posted.
The box-shadow CSS property is used to add shadow effects around an element's frame.
Here, design samples of box-shadow property using style sheets are posted.
Using
In this example, Picturefill is added for IE.
Grid is the value of the CSS display property.
Here, layout samples of grid property are posted.
Flex is the value of the CSS display property.
It is a standard button design of Bootstrap Framework.
Hover.css is a style-sheet collection of hover effects.
Button.css is collection of CSS3 button animations.
It is a standard Card design of Bootstrap Framework.
Arctext.js is a jQuery plugin that causes a string to curve along a specified circle radius.
Lettering.js is a jQuery plugin that encloses a specified character string with one character, one word, one column by <span> tag.
Textillate.js is a jQuery plugin that adds In / Out animation effects to text.
FitText.js is jQuery plugin that fits the font size according to the width of the parent element.
FeedEk is a jQuery plugin that parses RSS and Atom feeds and displays them.
Introduction of various embedment methods of YouTube.
FitVids is a jQuery plug-in that converts YouTube videos embedded with iframe into responsive.
xZoom is a jQuery plug-in that shows a zoom preview of the image.
It is possible to customize the preview position and zoom.
Instagram.css is a stylesheet set that filters photos like instagram.
Moment.js is a javascript that processes and displays date and time.
Bootstrap Material DatePicker is jQuery data picker plugin using Moment.js.
Multifilter is jQuery Table Filtering Plugin.
Responsive table using "display: flex;".
Not supported for rowspan.
Responsive table using "display: grid;".
Not supported for rowspan.
It is a standard Table design of Bootstrap Framework.
jQuery Mask Plugin is jQuery plugin that make mask (validation) on form field.
Select2 is a jquery plugin that makes select form more advanced.
Here is the basic usage of Select2.
jQuery Searcher is jQuery search/filtering plugin that supports various markups.
It is a standard Carousel of Bootstrap Framework.
FlexSlider is responsive jQuery slider plugin.
Here, basic single slider setting of Flexslider are posted.
FlexSlider is responsive jQuery slider plugin.
Here, basic carousel slider setting of Flexslider are posted.
slick is responsive jQuery slider plugin.
Here, basic single slider setting of slick are posted.
slick is responsive jQuery slider plugin.
Here, carousel slider setting of slick are posted.
fancyBox is jQuery lightbox plugin.
Here, basic image lightbox setting of fancyBox are posted.
fancyBox is jQuery lightbox plugin.
Here, YouTube, Vimeo, Instagram, Google Maps, inline HTML, iframe lightbox setting of fancyBox are posted.
Magnific Popup is jQuery lightbox plugin.
Here, basic image lightbox setting of Magnific Popup are posted.
Magnific Popup is jQuery lightbox plugin.
Here, YouTube, Vimeo, Google Maps, inline HTML lightbox setting of Magnific Popup are posted.
Since Magnific Popup does not incorporate animation effects by standard, you need to set it yourself.
Here we summarize the CSS3-based animation settings.
animsition is a jQuery plugin that adds an in/out animation effect at the time of page transition.
GreedyNav is a responsive navigation menu using jQuery which switches over the items that protruded when the screen was scaled down to dropdown.
GridTab is a lightweight jQuery plugin to create grid based responsive tabs.
jQuery.NiceScroll is a jQuery plugin that extends scroll display and functions.
metisMenu is a jQuery plugin that expands vertical and vertical menus.
fullPage.js is jQuery Fullscreen Scrolling plugin.
Here, basic fullscreen scrolling of fullPage.js are posted.
fullPage.js is jQuery Fullscreen Scrolling plugin.
Here, navigation menu is displayed..
Offside.js is a JavaScript kit that expands off-canvas.
This is a sample where the left side off-canvas expands.
Offside.js is a JavaScript kit that expands off-canvas.
This is a sample that expands multiple off-canvases.
Filterizr is a jQuery plugin that sorts, shuffles, searches for the items in the container.
This is a basic sample without setting options.
Filterizr is a jQuery plugin that sorts, shuffles, searches for the items in the container.
This is a sample of more advanced setting of Filterizr.
animsition is a jQuery plugin that adds an in/out animation effect at the time of page transition.
Textillate.js is a jQuery plugin that adds In / Out animation effects to text.
Scrolla is jQuery scroll animation plugin.
Hover.css is a style-sheet collection of hover effects.
Animate.css is a style-sheet collection of animation effects.
jQuery Easing Plugin is a plugin to extend the easing (animation effect) of jQuery.
The easing of element is posted.
fullPage.js is jQuery Fullscreen Scrolling plugin.
Here, basic fullscreen scrolling of fullPage.js are posted.
fullPage.js is jQuery Fullscreen Scrolling plugin.
Here, navigation menu is displayed..
jQuery.mb.YTPlayer is jQuery Background player plugin.
Hint.css is a style sheet set for tooltip.
You can display tooltip just by adding class name.
Protip is a jQuery plugin that generates tooltips.
Set the position, size, etc. of the tooltip only with data attribute.
It is a standard Carousel of Bootstrap Framework.
It is a standard Card design of Bootstrap Framework.
It is a standard button design of Bootstrap Framework.
It is a standard Table design of Bootstrap Framework.
HTML5 Cheat Sheet by Make A Website Hub
CSS3 Cheat Sheet by Smashing Magazine
This is the Visual Studio Code default keyboard shortcut list.
Cheese sheet of TweenMAX, TweenLite, TimelineLite, TimelineMax by GreenSock.
On this page you can search for codes collectively.
It is a news feed about design.