Proste menu uzyskane za pomocą CSS, którego elementy oprócz podświetlenia, odbijają się lekko w bok w momencie najechania kursorem.

Download: link
Źródło: http://cssdeck.com/labs/wxtftwhm

HTML

<!--//////////////Created by Ryan Bishop./////////////////// Check out more of my work at: http://dribbble.com/RyanBishop ---------------------------OR------------------------------- ------------Follow me on twitter: @abletroner--------------- //////////////////////////////////////////////////////////--> <!-- Google Fonts --> <link href="//fonts.googleapis.com/css?family=Strait" rel="stylesheet" type="text/css"></link> <!-- HTML --> <div class="menu-container"> <div class="nav"> <div class="settings"> </div> </div> <div class="menu"> <ul> <li><a href="//www.blogger.com/blogger.g?blogID=4817203568281494964#" target="_blank"><img src="https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uQNQdZiJ1ku_tAqpDtzb0RfMpuhVDPazTEgdQ0heRRolpdDG7_6yOrFwDQcynSYpnxje5NkzFeLcEbL0Ow6Q=s0-d">Search</a></li> <li><a href="//www.blogger.com/blogger.g?blogID=4817203568281494964#" target="_blank"><img src="https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_tQCa5JB6rp7dswJk7Jeq4XphLpG4VVNQlkpsCRitEmPyS-SUySatLLP4vmspsIdi94SyC4ESmQBuTP5pm4TKQ=s0-d">Upload</a></li> <li><a href="//www.blogger.com/blogger.g?blogID=4817203568281494964#" target="_blank"><img src="https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_u6-2D-Dr0M7mPGeh-myd-rBFoU7goI32GQZ7icPqW6Hpr17--_snComT8CooIVIvdumJhmil3mrTwV3WOeCvc=s0-d">Location</a></li> <li><a href="//www.blogger.com/blogger.g?blogID=4817203568281494964#" target="_blank"><img src="https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_un9z7hbJ031hRUWas5rblqER3za_2w_fQMt4ws0A2qgx4Nmo51braHiSoHIqO2-tRz8tKlYHebUi8QBeZ6m4A=s0-d">Contacts</a></li> </ul> </div> </div>

CSS

/*///////////////Created by Ryan Bishop.//////////////////// Check out more of my work at: http://dribbble.com/RyanBishop ---------------------------OR------------------------------- ------------Follow me on twitter: @abletroner--------------- //////////////////////////////////////////////////////////*/ * { margin: 0; padding: 0; } body { background-color: #a3cabd; } .menu-container { display: block; position: relative; width: 300px; background-color: #f3f0ef; margin: 5% auto 0; padding: 0; border-radius:5px; box-shadow: inset 0 0 1px rgba(255,255,255,1); box-shadow: 5px 5px 15px 1px rgba(0,0,0,0.1); } .nav{ background-color: #ed6b3a; height:40px; border-radius:5px 5px 0 0; } .settings { height:20px; float:right; background-image:url(http://i.imgur.com/CLs7u.png); width:20px; margin:10px; } .menu ul { list-style:none; } .menu ul li { border-top:1px solid rgba(0,0,0,0.1); padding:11px 10px; box-shadow:inset 0 1px 1px #fff; text-indent:10px; } .menu ul li a { font-size:14px; color:#a4a3a3; font-family: 'Strait', sans-serif; font-size:14px; text-decoration:none; text-shadow: 1px 1px 1px #fff; } .menu ul li img { float:left; margin:-2px 0 0 0; } .menu ul li:hover { border-left:3px solid #ed6b3a; background-color:rgba(0,0,0,0.02); }

CSS menu z subtelną animacją

Button z zaokrąglonymi rogami, w całości uzyskany za pomocą CSS. Najlepiej prezentuje się na ciemnym tle. Wstawienie w HTML to zaledwie jedna linijka!

Źródło: http://cssdeck.com/labs/3d-push-button

HTML

<a class="pushButton">EFCIA</a>

CSS

@import url(http://fonts.googleapis.com/css?family=BenchNine) body font-family: "BenchNine", sans-serif background-image: url(http://subtlepatterns.com/patterns/classy_fabric.png) .pushButton display: block color: #fff cursor: pointer width: 120px height: 45px position: absolute top: 50% left: 50% margin-top: -(@height/2) margin-left: -(@width/2) line-height: @height text-align: center border-radius: 5px box-shadow: 0 1px 0 0 rgba(255, 255, 255, .2) inset, 1px 1px 10px 0 rgba(0, 0, 0, .5), -1px -1px 0 0 rgba(0, 0, 0, .4) inset background: linear-gradient(top, #37352e, #2e2d26) background: -moz-linear-gradient(top, #37352e, #2e2d26) text-shadow: 0 1px rgba(0,0,0,.5) transition: all 10ms .pushButton:active background: linear-gradient(top, #2c2a23, #323028) box-shadow: 0 -1px 0 0 rgba(255, 255, 255, .2) inset, 0 1px 10px 0 rgba(0, 0, 0, .4) inset color: #686662 opacity: .9 text-shadow: 0 -1px rgba(0,0,0,.5)

CSS - Zaokrąglony przycisk z efektem przezroczystości

Ramka wykonana w całości przy użyciu CSS, bez zbędnej grafiki.
Źródło: http://cssdeck.com/labs/fence-edge

HTML

div jakiś_napis

CSS

$size: 10px $size-double: $size*2 html height: 100% body height: 100% margin: 0 text-align: center &:after content: "" display: inline-block vertical-align: middle height: 100% width: 0 div display: inline-block vertical-align: middle line-height: 120px width: 75% padding: $size $size font-size: 28px font-family: Arial, sans-serif color: #fff text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) border: $size solid transparent border-width: $size 0 background-color: lightblue background-color: hsla(0, 0%, 0%, 0) $half: 50.5% $color-top: transparent $half, lightblue $half $color-bottom: transparent $half, skyblue $half $top-left: linear-gradient(top left, $color-top) $top-right: linear-gradient(top right, $color-top) $bottom-left: linear-gradient(bottom left, $color-bottom) $bottom-right: linear-gradient(bottom right, $color-bottom) @include background-image(linear-gradient(lightblue, skyblue), $top-left, $top-right, $bottom-left, $bottom-right) background-repeat: repeat, repeat-x, repeat-x, repeat-x, repeat-x background-position: 0 0, $size 0, $size 0, $size 100%, $size 100% background-size: auto auto, $size-double $size-double, $size-double $size-double, $size-double $size-double, $size-double $size-double background-clip: padding-box, border-box, border-box, border-box, border-box background-origin: padding-box, border-box, border-box, border-box, border-box

CSS box z ozdobną krawędzią

Po najechaniu kursorem na grafikę, pojawia się lupa. Sporadycznie spotykany efekt, wyglądający bardzo estetycznie.


Źródło: http://cssdeck.com/labs/magnifying-glass-plugin-with-jquery-and-css3

HTML

<link href="//fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet" type="text/css"> <div id="wrap"> <h1>Super Cool Magnifying Glass For Image Zoom</h1> <h2>Demo</h2> <div class="product"><img class="magniflier" src="https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_vd2qM0V67rHDpOEPyyGb-ZxK6Dluns-FDfz2cp67oTgyg9gZr8eh7Fg5a2EA6v-WiO93_kFFGy5VHpuvEiRqXWDIG5dvUBEF0pBwwnVJewbIcvF7gR=s0-d" width="300"></div> <div class="product"><img class="magniflier" src="https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uvQgzSMf0cmmEkz00TvK20DfEM5aBK3jWRYo6TPBXfJMyeOhtagBfQVrhnHUz4Co-CVPhb_SFdnVNqb8MsRRe0wT1p_6VKYqePoG1-pBUgviK6QOA=s0-d" width="300"></div> <div class="product"><img class="magniflier" src="https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uTjElvpTgfAujnQ1oVdLNhIE9Fdp2Zyo3Vsa6rAm4LJCbHSXr4Nu12TGNlFtH9fcA9TtBHaG-8iAG-VJwKmE4VZ5HCbYq2Fz2wSiImAQHR0GlSt-wf=s0-d" width="300"></div> <h2>Usage</h2> <p><a href="http://codetheory.in/image-zoom-magnifying-glass-effect-with-css3-and-jquery/">Read this Article</a></p> </div> <!-- Time for jquery action --> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

CSS

.glass { width: 175px; height: 175px; position: absolute; border-radius: 50%; cursor: crosshair; /* Multiple box shadows to achieve the glass effect */ box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.85), 0 0 7px 7px rgba(0, 0, 0, 0.25), inset 0 0 40px 2px rgba(0, 0, 0, 0.25); /* hide the glass by default */ display: none; } /********* *** Styles just for DEMO purpose *********/ body{ background: black url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/wild_oliva.png); font-family: 'ubuntu', arial, verdana; color: #fff; font-size: 14px; } #wrap { max-width: 700px; margin: 20px auto; } .product { margin: 20px auto; text-align: center; padding: 20px; } h1, h2, h3 { text-align: center; margin: 50px 0; font-size: 30px; color: #fff; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.75); } h2 { font-size: 26px; margin: 25px 0; } a { color: white; }

JS

$(function() { var native_width = 0; var native_height = 0; var mouse = {x: 0, y: 0}; var magnify; var cur_img; var ui = { magniflier: $('.magniflier') }; // Add the magnifying glass if (ui.magniflier.length) { var div = document.createElement('div'); div.setAttribute('class', 'glass'); ui.glass = $(div); $('body').append(div); } // All the magnifying will happen on "mousemove" var mouseMove = function(e) { var $el = $(this); // Container offset relative to document var magnify_offset = cur_img.offset(); // Mouse position relative to container // pageX/pageY - container's offsetLeft/offetTop mouse.x = e.pageX - magnify_offset.left; mouse.y = e.pageY - magnify_offset.top; // The Magnifying glass should only show up when the mouse is inside // It is important to note that attaching mouseout and then hiding // the glass wont work cuz mouse will never be out due to the glass // being inside the parent and having a higher z-index (positioned above) if ( mouse.x < cur_img.width() && mouse.y < cur_img.height() && mouse.x > 0 && mouse.y > 0 ) { magnify(e); } else { ui.glass.fadeOut(100); } return; }; var magnify = function(e) { // The background position of div.glass will be // changed according to the position // of the mouse over the img.magniflier // // So we will get the ratio of the pixel // under the mouse with respect // to the image and use that to position the // large image inside the magnifying glass var rx = Math.round(mouse.x/cur_img.width()*native_width - ui.glass.width()/2)*-1; var ry = Math.round(mouse.y/cur_img.height()*native_height - ui.glass.height()/2)*-1; var bg_pos = rx + "px " + ry + "px"; // Calculate pos for magnifying glass // // Easy Logic: Deduct half of width/height // from mouse pos. // var glass_left = mouse.x - ui.glass.width() / 2; // var glass_top = mouse.y - ui.glass.height() / 2; var glass_left = e.pageX - ui.glass.width() / 2; var glass_top = e.pageY - ui.glass.height() / 2; //console.log(glass_left, glass_top, bg_pos) // Now, if you hover on the image, you should // see the magnifying glass in action ui.glass.css({ left: glass_left, top: glass_top, backgroundPosition: bg_pos }); return; }; $('.magniflier').on('mousemove', function() { ui.glass.fadeIn(100); cur_img = $(this); var large_img_loaded = cur_img.data('large-img-loaded'); var src = cur_img.data('large') || cur_img.attr('src'); // Set large-img-loaded to true // cur_img.data('large-img-loaded', true) if (src) { ui.glass.css({ 'background-image': 'url(' + src + ')', 'background-repeat': 'no-repeat' }); } // When the user hovers on the image, the script will first calculate // the native dimensions if they don't exist. Only after the native dimensions // are available, the script will show the zoomed version. //if(!native_width && !native_height) { if (!cur_img.data('native_width')) { // This will create a new image object with the same image as that in .small // We cannot directly get the dimensions from .small because of the // width specified to 200px in the html. To get the actual dimensions we have // created this image object. var image_object = new Image(); image_object.onload = function() { // This code is wrapped in the .load function which is important. // width and height of the object would return 0 if accessed before // the image gets loaded. native_width = image_object.width; native_height = image_object.height; cur_img.data('native_width', native_width); cur_img.data('native_height', native_height); //console.log(native_width, native_height); mouseMove.apply(this, arguments); ui.glass.on('mousemove', mouseMove); }; image_object.src = src; return; } else { native_width = cur_img.data('native_width'); native_height = cur_img.data('native_height'); } //} //console.log(native_width, native_height); mouseMove.apply(this, arguments); ui.glass.on('mousemove', mouseMove); }); ui.glass.on('mouseout', function() { ui.glass.off('mousemove', mouseMove); }); });

CSS+JS hover zoom effect

Trik w CSS3, który naprawdę wprawia w zdumienie. Fantazyjny efekt wstążki osadzony na zaokrąglonym końcu ramki, która dodatkowo jest wycieniowana na krawędziach. Kod jest długi, jednak warto z niego skorzystać.

HTML

<div class="wrapper"> <div class="ribbon-wrapper-green"> <div class="ribbon-green"> NEWS</div> </div> </div>

CSS

.wrapper { margin: 50px auto; width: 280px; height: 370px; background: white; border-radius: 10px; -webkit-box-shadow: 0px 0px 8px rgba(0,0,0,0.3); -moz-box-shadow: 0px 0px 8px rgba(0,0,0,0.3); box-shadow: 0px 0px 8px rgba(0,0,0,0.3); position: relative; z-index: 90; } .ribbon-wrapper-green { width: 85px; height: 88px; overflow: hidden; position: absolute; top: -3px; right: -3px; } .ribbon-green { font: bold 15px Sans-Serif; color: #333; text-align: center; text-shadow: rgba(255,255,255,0.5) 0px 1px 0px; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); position: relative; padding: 7px 0; left: -5px; top: 15px; width: 120px; background-color: #BFDC7A; background-image: -webkit-gradient(linear, left top, left bottom, from(#BFDC7A), to(#8EBF45)); background-image: -webkit-linear-gradient(top, #BFDC7A, #8EBF45); background-image: -moz-linear-gradient(top, #BFDC7A, #8EBF45); background-image: -ms-linear-gradient(top, #BFDC7A, #8EBF45); background-image: -o-linear-gradient(top, #BFDC7A, #8EBF45); color: #6a6340; -webkit-box-shadow: 0px 0px 3px rgba(0,0,0,0.3); -moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.3); box-shadow: 0px 0px 3px rgba(0,0,0,0.3); } .ribbon-green:before, .ribbon-green:after { content: ""; border-top: 3px solid #6e8900; border-left: 3px solid transparent; border-right: 3px solid transparent; position:absolute; bottom: -3px; } .ribbon-green:before { left: 0; } .ribbon-green:after { right: 0; } Download: https://www.box.com/s/6fn0l7zzuzii9fdq4nq0
Źródło: http://jsfiddle.net/chriscoyier/H6rQ6/1/

CSS3 - Estetyczna wstążka (bez grafiki!)

Animacja stworzona za pomocą CSS'a - niesamowity efekt!

HTML

<!-- autor: Marco Barría --> <div class="hoja">efcia</div>

CSS

@import url(http://fonts.googleapis.com/css?family=Open+Sans:700); // ============================================ VAR @D:280px; // size control // diametro @R:(@D/2); // radio @B:(@R/8); @O: 0.5; // opacity @A: 2s; // accelerate html, body{ height:100%; } body{ background:rgb(255,255,244); } .hoja{ color:rgb(220,220,226); position:absolute; top:50%; left:50%; margin-left:-@R; margin-top:-@R; width:@D; height:@D; text-align:center; font-family: 'Open Sans', sans-serif; font-size:@R/4; line-height:@D; -webkit-font-smoothing: antialiased; } .hoja:after, .hoja:before{ content:""; border-radius:100%; position:absolute; top:0; left:0; width:100%; height:100%; transform-origin:center center; transform:rotateZ(0deg) scaleX(1) scaleY(1); } .hoja:after{ box-shadow: inset 0 @B 0 rgba(250, 250, 0, @O), inset @B 0 0 rgba(250, 200, 0, @O), inset 0 -@B 0 rgba(250, 150, 0, @O), inset -@B 0 0 rgba(250, 100, 0, @O); animation:rotar @A linear infinite; } .hoja:before{ box-shadow: inset 0 @B 0 rgba(0, 250, 250, @O), inset @B 0 0 rgba(0, 200, 200, @O), inset 0 -@B 0 rgba(0, 150, 200, @O), inset -@B 0 0 rgba(0, 200, 250, @O); animation:rotarIz @A linear infinite; } @keyframes rotar{ 0%{ transform:rotateZ(0deg) scaleX(1) scaleY(1); } 50%{ transform:rotateZ(180deg) scaleX(0.82) scaleY(0.95); } 100%{ transform:rotateZ(360deg) scaleX(1) scaleY(1); } } @keyframes rotarIz{ 0%{ transform:rotateZ(0deg) scaleX(1) scaleY(1); } 50%{ transform:rotateZ(-180deg) scaleX(0.95) scaleY(0.85); } 100%{ transform:rotateZ(-360deg) scaleX(1) scaleY(1); } }
Źródło: http://cssdeck.com/labs/double-ring

CSS Animowany barwny pierścień - robi wrażenie!


Nie wszyscy wiedzą, że nie potrzebujemy programu graficznego, aby wydobyć palety głównych kolorów z jakiegoś zdjęcia. Wykorzystanie prostego narzędzia, jakim jest Colors Pallete Generator nie tylko skróci nam cały proces, lecz również od razu podzieli wydobyte kolory na kategorie - palety jasne, średnie, ciemne, oraz paleta ogólna. Do każdego z wyodrębnionych kolorów dostajemy jego nazwę w postaci #000000.
Korzystanie z generatora jest bajecznie proste. Początkowo należy wgrać na serwer interesującą nas grafikę (możemy to zrobić wpisując adres url lub wybierając plik z naszego komputera); wgrywanie rozpoczynamy klikając GET PALETTE.
    O czym należy wiedzieć?
  • Maksymalny rozmiar załączonego pliku graficznego: 1MB
  • Dopuszczalne rozszerzenia: .png, .gif, .jpg, .jpeg
  • Uzyskane palety możemy zapisać w postaci pliku *.css lub swatch'y do Photoshop'a *.aco
Źródło: http://www.cssdrive.com/imagepalette/index.php

Colors Pallete Generator - palety kolorów ze zdjęcia