Pokazywanie postów oznaczonych etykietą css3. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą css3. Pokaż wszystkie posty
Źródło: http://css-tricks.com/snippets/css/stitched-look/

HTML

<div class="stitched"> Stitched </div>

CSS

.stitched { padding: 20px; margin: 10px; background: #ff0030; color: #fff; font-size: 21px; font-weight: bold; line-height: 1.3em; border: 2px dashed #fff; border-radius: 10px; box-shadow: 0 0 0 4px #ff0030, 2px 1px 6px 4px rgba(10, 10, 0, 0.5); text-shadow: -1px -1px #aa3030; font-weight: normal; } body { padding: 10px; }

CSS3 - fastryga (uszyta ramka)

Czyli wstążka po tunningu, bez użycia grafiki.

Źródło: http://cssdeck.com/labs/iaa9esiq

HTML



<!-- Lets make a cool single element ribbon --> <h1> Single Element - Pure CSS3 - Type here...</h1> <!-- PrefixFree to deal with vendor prefixes --> <script src="//thecodeplayer.com/uploads/js/prefixfree-1.0.7.js" type="text/javascript"></script>

CSS


/*Basic reset*/ * {margin: 0; padding: 0;} html, body {height: 100%;} body { background: #B1E3E2; box-shadow: inset 0 0 100px 20px #80D0CF; text-align: center; } h1 { display: inline-block; font-size: 14px; line-height: 28px; color: #8699A0; text-shadow: 0 0 1px #758890; margin: 120px 0; font-family: arial, verdana; outline: none; padding: 14px 30px; position: relative; text-transform: uppercase; /*A little shadow for 3d effect*/ /*Finally another shadow to negate some aspects of the :after element to complete the effect. This drops a shrinked shadow over the :after element with the same color like that of the background. The shadow is shrinked by the same offset amount = 18. And it is moved down by twice the offset amount to cover the entire height of the :after element*/ box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1), 0 36px 0 -18px #B1E3E2; } /*The ribbon ends*/ h1:before { content: ''; position: absolute; top: 18px; left: -15%; z-index: -1; width: 130%; /*We will be using the triangle logic - 2 sided borders and 0 height. That will create negative triangles on the left and right*/ height: 0; border: 28px solid rgba(0, 0, 0, 0); border-left: 28px solid #B1E3E2; border-right: 28px solid #B1E3E2; /*Same color as the container which is the body in this case*/ } /*The after pseudo element will negatve the bottom part of the ribbon completing the effect*/ h1:after { content: ''; width: 100%; height: 0; position: absolute; top: 100%; left: 0; z-index: -1; /*The height of the top border is same as width of the left/right borders for the smoothest effect. The height of the top border is also the same as the offset the :before element has from the top*/ border-top: 18px solid #99acb2; border-left: 18px solid transparent; border-right: 18px solid transparent; } h1, h1:before { /*Some cool multi-background - we will use a combination of 4 backgrounds to create a cool effect*/ background-image: /*2 grey borders*/ linear-gradient( transparent 8%, rgba(0, 0, 0, 0.1) 8%, rgba(0, 0, 0, 0.1) 14%, transparent 14%, transparent 86%, rgba(0, 0, 0, 0.1) 86%, rgba(0, 0, 0, 0.1) 92%, transparent 92% ), /*white gloss gradient*/ linear-gradient( rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) ), /*thin stripes*/ linear-gradient( 45deg, transparent 40%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.1) 60%, transparent 60% ), /*white base*/ linear-gradient(white, white); background-size: cover, /*borders*/ cover, /*white gloss*/ 4px 4px, /*thin stripes*/ cover; /*base white*/ } h1, h1:before, h1:after { box-sizing: border-box; /*Fix to make the borders appear on the ribbon ends also*/ background-origin: border-box; }

CSS3 - a cool single element ribbon

Wstawiamy dowolne zdjęcie, natomiast całą resztę bierze na siebie CSS. W efekcie otrzymujemy poświatę naokoło ramki- wszystko oczywiście dopasowane kolorystycznie.

Najlepszy efekt uzyskamy na ciemnym tle.

Wykorzystuje filtry SVG.


Źródło: http://cssdeck.com/labs/ambi-glow

HTML

<pre class="brush:html"><!--[if lt IE 7]> <div class="wrapper lt-ie10 lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <div class="wrapper lt-ie10 lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <div class="wrapper lt-ie10 lt-ie9"> <![endif]--> <!--[if IE 9]> <div class="wrapper lt-ie10"> <![endif]--> <!--[if gt IE 9]><!--> <div class="wrapper"> <!--<![endif]--> <div class="centered"> <div class="inner"> <img alt="nostalgia by Nikos Zacharoulis" class="pic" height="280" src="https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uMrctxgA8MJaqmCr7N6VR3gsoDrxmBmhcd7x-0xDM4nKrtIiD7PIdb2BZ2wBJHvUlI1rq2BHuwB5YB6ZxbGwQtG3QSWziCtYPLX35PXQYec6-uxZtdS2jeIPVVGsKCimfOTUBO0juoOkc-2Z62myE=s0-d" width="280"> </div> </div> <!--[if lte IE 9]> <img class="ie-fallback-bg-blur" src="http://pcdn.500px.net/27549003/d409bce305cd0f77f3b12d124f69c7a3659bfaea/3.jpg" width="280" height="280" alt="nostalgia by Nikos Zacharoulis"> <![endif]--> <svg class="bg-blur"> <defs> <filter height="400%" id="blur" width="400%" x="-200%" y="-200%"> <fegaussianblur in="SourceGraphic" stddeviation="70"> </fegaussianblur></filter> </defs> <image filter="url(#blur)" height="280" id="svg-image" width="280" x="150" xlink:href="http://pcdn.500px.net/27549003/d409bce305cd0f77f3b12d124f69c7a3659bfaea/3.jpg" y="150"> </image></svg> <!-- Supported: IE 10 Firefox 3+ Chrome 8+ Safari 6 Opera 9+ Opera mini Opera Mobile 10 Chrome for Android Firefox for Android Fallback to IE-filters in IE9 and below Not supported: Safari 5.1 and below Android Browser 4.2 and below iOS Safari 5.1 and below http://caniuse.com/#feat=svg-filters -->

CSS

/* author: Paul Radzkov http://paulradzkov.com/2013/gaussian_blur/ */ html, body { margin: 0; padding: 0; height: 100%; width: 100%; } html { display: table; } body { display: table-cell; vertical-align: middle; text-align: center; background: black; color: #FFF; } .centered { position: relative; z-index: 1; float: left; left: 50%; } .centered .inner { position: relative; left: -50%; } /* positioning for IE7 */ .lt-ie8 .centered { position: absolute; top: 50%; } .lt-ie8 .centered .inner { top:-50%; } /* blur position */ .bg-blur { height: 580px; width: 580px; position: absolute; left: 50%; top: 50%; margin-left: -290px; margin-top: -290px; z-index: 0; } /* IE fallback */ .lt-ie10 #svg-image { display: none; } .ie-fallback-bg-blur { height: 280px; width: 280px; padding: 80px; position: absolute; left: 50%; top: 50%; margin-left: -290px; margin-top: -290px; z-index: 0; filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=70); } /* decoration */ .pic { display: block; border: 1px solid rgba(0,0,0,0.5); box-shadow: 0 5px 15px rgba(0,0,0,0.5), 0 3px 5px rgba(0,0,0,0.2); } .inner:before { content: ''; position: absolute; top: 1px; right: 1px; bottom: 1px; left: 1px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15); }

CSS3 - Otaczająca poświata (ambient glow)



Kilkukrotnie wstawiony tekst w nagłówku H1, który zmienia swoją barwę i położenie.
Źródło: http://cssdeck.com/labs/7y2gz430

HTML


<figure> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> <h1> Glowing text</h1> </figure>

CSS


@import url(http://fonts.googleapis.com/css?family=Concert+One); h1 { animation:glow 10s ease-in-out infinite; /* For less laggy effect, uncomment this: animation:none; -webkit-text-stroke:1px #fff; =========== */ } * { box-sizing:border-box; } body { background:#0a0a0a; overflow:hidden; text-align:center; } figure { animation:wobble 5s ease-in-out infinite; transform-origin:center center; transform-style:preserve-3d; } @keyframes wobble { 0%,100%{ transform:rotate3d(1,1,0,40deg); } 25%{ transform:rotate3d(-1,1,0,40deg); } 50%{ transform:rotate3d(-1,-1,0,40deg); } 75%{ transform:rotate3d(1,-1,0,40deg); } } h1 { display:block; width:100%; padding:40px; line-height:1.5; font:900 8em 'Concert One', sans-serif; text-transform:uppercase; position:absolute; color:#0a0a0a; } @keyframes glow { 0%,100%{ text-shadow:0 0 30px red; } 25%{ text-shadow:0 0 30px orange; } 50%{ text-shadow:0 0 30px forestgreen; } 75%{ text-shadow:0 0 30px cyan; } } h1:nth-child(2){ transform:translateZ(5px); } h1:nth-child(3){ transform:translateZ(10px);} h1:nth-child(4){ transform:translateZ(15px); } h1:nth-child(5){ transform:translateZ(20px); } h1:nth-child(6){ transform:translateZ(25px); } h1:nth-child(7){ transform:translateZ(30px); } h1:nth-child(8){ transform:translateZ(35px); } h1:nth-child(9){ transform:translateZ(40px); } h1:nth-child(10){ transform:translateZ(45px); }

CSS3 - Animacja tekstu

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!


Czysto i przejrzyście wykończone elementy strony internetowej niekoniecznie muszą być skomplikowane w wykonaniu. Przedstawiam estetyczną ramkę wykonaną za pomocą CSS3, bez użycia grafiki.

Tradycyjnie są dwa rodzaje wiadomości ;) Dobrą jest, że poniższe rozwiązanie działa w Firefoxie, Chromie, Safari i Operze. Natomiast złą wiadomością, że nie działa pod IE7/IE8 (a to niespodzianka!).

HTML

<div class="curved_corners"> <div class="font_titles">Tytuł</div> <div class="font_text">Treść.</div> </div>

CSS

<style type="text/css"> body { background-color: #e8e8e8; } .font_titles { font-family:arial; font-size:28px; font-weight:bold; color:#2b3b4e; } .font_text { font-family:arial; font-size:12px; color:#2b3b4e; } .curved_corners { text-align:justify; margin-left: 70px; border:2px solid #BBBBBB; padding:30px 30px; background:#FFFFFF; width:300px; height:180px; border-radius:20px; -moz-border-radius:20px; /* Firefox 3.6 and earlier */ /* Creating the shadows */ box-shadow: 2px 2px 15px #888888; -moz-box-shadow: 2px 2px 15px #888888; -webkit-box-shadow: 2px 2px 15px #888888; } .spacer { margin-top:15px; } </style> Download: link (plik *.html)
Źródło: http://www.techheadz.co.uk/208.html

CSS3 box z efektem cienia i zaokrąglonymi rogami