0

0

50 Useful CSS Snippets Every Designer Should Have_html/css_WEB-ITnose

php中文网

php中文网

发布时间:2016-06-21 08:54:36

|

1582人浏览过

|

来源于php中文网

原创

 1. css resets    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {      margin: 0;      padding: 0;      border: 0;      font-size: 100%;      font: inherit;      vertical-align: baseline;      outline: none;      -webkit-box-sizing: border-box;      -moz-box-sizing: border-box;      box-sizing: border-box;    }    html { height: 101%; }    body { font-size: 62.5%; line-height: 1; font-family: arial, tahoma, sans-serif; }    article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; }    ol, ul { list-style: none; }    blockquote, q { quotes: none; }    blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }    strong { font-weight: bold; }     table { border-collapse: collapse; border-spacing: 0; }    img { border: 0; max-width: 100%; }    p { font-size: 1.2em; line-height: 1.0em; color: #333; }2. classic css clearfix    .clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; }    .clearfix { display: inline-block; }    html[xmlns] .clearfix { display: block; }    * html .clearfix { height: 1%; }3. 2011 updated clearfix    .clearfix:before, .container:after { content: ""; display: table; }    .clearfix:after { clear: both; }    /* ie 6/7 */    .clearfix { zoom: 1; }4. cross-browser transparency    .transparent {        filter: alpha(opacity=50); /* internet explorer */        -khtml-opacity: 0.5;      /* khtml, old safari */        -moz-opacity: 0.5;       /* mozilla, netscape */        opacity: 0.5;           /* fx, safari, opera */    }5. css blockquote template    blockquote {        background: #f9f9f9;        border-left: 10px solid #ccc;        margin: 1.5em 10px;        padding: .5em 10px;        quotes: "\201c""\201d""\2018""\2019";    }    blockquote:before {        color: #ccc;        content: open-quote;        font-size: 4em;        line-height: .1em;        margin-right: .25em;        vertical-align: -.4em;    }    blockquote p {        display: inline;    }6. individual rounded corners    #container {        -webkit-border-radius: 4px 3px 6px 10px;        -moz-border-radius: 4px 3px 6px 10px;        -o-border-radius: 4px 3px 6px 10px;        border-radius: 4px 3px 6px 10px;    }    /* alternative syntax broken into each line */    #container {        -webkit-border-top-left-radius: 4px;        -webkit-border-top-right-radius: 3px;        -webkit-border-bottom-right-radius: 6px;        -webkit-border-bottom-left-radius: 10px;        -moz-border-radius-topleft: 4px;        -moz-border-radius-topright: 3px;        -moz-border-radius-bottomright: 6px;        -moz-border-radius-bottomleft: 10px;    }7. general media queries/* smartphones (portrait and landscape) ----------- */@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {  /* styles */}/* smartphones (landscape) ----------- */@media only screen and (min-width : 321px) {  /* styles */}/* smartphones (portrait) ----------- */@media only screen and (max-width : 320px) {  /* styles */}/* ipads (portrait and landscape) ----------- */@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {  /* styles */}/* ipads (landscape) ----------- */@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {  /* styles */}/* ipads (portrait) ----------- */@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {  /* styles */}/* desktops and laptops ----------- */@media only screen and (min-width : 1224px) {  /* styles */}/* large screens ----------- */@media only screen and (min-width : 1824px) {  /* styles */}/* iphone 4 ----------- */@media only screen and (-webkit-min-device-pixel-ratio:1.5), only screen and (min-device-pixel-ratio:1.5) {  /* styles */}8. modern font stacks/* times new roman-based serif */font-family: cambria, "hoefler text", utopia, "liberation serif", "nimbus roman no9 l regular", times, "times new roman", serif;/* a modern georgia-based serif */font-family: constantia, "lucida bright", lucidabright, "lucida serif", lucida, "dejavu serif," "bitstream vera serif", "liberation serif", georgia, serif;/*a more traditional garamond-based serif */font-family: "palatino linotype", palatino, palladio, "urw palladio l", "book antiqua", baskerville, "bookman old style", "bitstream charter", "nimbus roman no9 l", garamond, "apple garamond", "itc garamond narrow", "new century schoolbook", "century schoolbook", "century schoolbook l", georgia, serif;/*the helvetica/arial-based sans serif */font-family: frutiger, "frutiger linotype", univers, calibri, "gill sans", "gill sans mt", "myriad pro", myriad, "dejavu sans condensed", "liberation sans", "nimbus sans l", tahoma, geneva, "helvetica neue", helvetica, arial, sans-serif;/*the verdana-based sans serif */font-family: corbel, "lucida grande", "lucida sans unicode", "lucida sans", "dejavu sans", "bitstream vera sans", "liberation sans", verdana, "verdana ref", sans-serif;/*the trebuchet-based sans serif */font-family: "segoe ui", candara, "bitstream vera sans", "dejavu sans", "bitstream vera sans", "trebuchet ms", verdana, "verdana ref", sans-serif;/*the heavier "impact" sans serif */font-family: impact, haettenschweiler, "franklin gothic bold", charcoal, "helvetica inserat", "bitstream vera sans bold", "arial black", sans-serif;/*the monospace */font-family: consolas, "andale mono wt", "andale mono", "lucida console", "lucida sans typewriter", "dejavu sans mono", "bitstream vera sans mono", "liberation mono", "nimbus mono l", monaco, "courier new", courier, monospace;9. custom text selection::selection { background: #e2eae2; }::-moz-selection { background: #e2eae2; }::-webkit-selection { background: #e2eae2; }10. hiding h1 text for logoh1 {    text-indent: -9999px;    margin: 0 auto;    width: 320px;    height: 85px;    background: transparent url("images/logo.png") no-repeat scroll;}11. polaroid image borderimg.polaroid {    background:#000; /*change this to a background image or remove*/    border:solid #fff;    border-width:6px 6px 20px 6px;    box-shadow:1px 1px 5px #333; /* standard blur at 5px. increase for more depth */    -webkit-box-shadow:1px 1px 5px #333;    -moz-box-shadow:1px 1px 5px #333;    height:200px; /*set to height of your image or desired div*/    width:200px; /*set to width of your image or desired div*/}12. anchor link pseudo classesa:link { color: blue; }a:visited { color: purple; }a:hover { color: red; }a:active { color: yellow; }13. fancy css3 pull-quotes.has-pullquote:before {    /* reset metrics. */    padding: 0;    border: none;    /* content */    content: attr(data-pullquote);    /* pull out to the right, modular scale based margins. */    float: right;    width: 320px;    margin: 12px -140px 24px 36px;    /* baseline correction */    position: relative;    top: 5px;    /* typography (30px line-height equals 25% incremental leading) */    font-size: 23px;    line-height: 30px;}.pullquote-adelle:before {    font-family: "adelle-1", "adelle-2";    font-weight: 100;    top: 10px !important;}.pullquote-helvetica:before {    font-family: "helvetica neue", arial, sans-serif;    font-weight: bold;    top: 7px !important;}.pullquote-facit:before {    font-family: "facitweb-1", "facitweb-2", helvetica, arial, sans-serif;    font-weight: bold;    top: 7px !important;}14. fullscreen backgrounds with css3html {     background: url('images/bg.jpg') no-repeat center center fixed;     -webkit-background-size: cover;    -moz-background-size: cover;    -o-background-size: cover;    background-size: cover;}15. vertically centered content.container {    min-height: 6.5em;    display: table-cell;    vertical-align: middle;}16. force vertical scrollbarshtml { height: 101% }17. css3 gradients template#colorbox {    background: #629721;    background-image: -webkit-gradient(linear, left top, left bottom, from(#83b842), to(#629721));    background-image: -webkit-linear-gradient(top, #83b842, #629721);    background-image: -moz-linear-gradient(top, #83b842, #629721);    background-image: -ms-linear-gradient(top, #83b842, #629721);    background-image: -o-linear-gradient(top, #83b842, #629721);    background-image: linear-gradient(top, #83b842, #629721);}18. @font-face template@font-face {    font-family: 'mywebfont';    src: url('webfont.eot'); /* ie9 compat modes */    src: url('webfont.eot?#iefix') format('embedded-opentype'), /* ie6-ie8 */    url('webfont.woff') format('woff'), /* modern browsers */    url('webfont.ttf')  format('truetype'), /* safari, android, ios */    url('webfont.svg#svgfontname') format('svg'); /* legacy ios */}body {    font-family: 'mywebfont', arial, sans-serif;}19. stitched css3 elementsp {    position:relative;    z-index:1;    padding: 10px;    margin: 10px;    font-size: 21px;    line-height: 1.3em;    color: #fff;    background: #ff0030;    -webkit-box-shadow: 0 0 0 4px #ff0030, 2px 1px 4px 4px rgba(10,10,0,.5);    -moz-box-shadow: 0 0 0 4px #ff0030, 2px 1px 4px 4px rgba(10,10,0,.5);    box-shadow: 0 0 0 4px #ff0030, 2px 1px 6px 4px rgba(10,10,0,.5);    -webkit-border-radius: 3px;    -moz-border-radius: 3px;    border-radius: 3px;}p:before {    content: "";    position: absolute;    z-index: -1;    top: 3px;    bottom: 3px;    left :3px;    right: 3px;    border: 2px dashed #fff;}p a {    color: #fff;    text-decoration:none;}p a:hover, p a:focus, p a:active {    text-decoration:underline;}20. css3 zebra stripestbody tr:nth-child(odd) {    background-color: #ccc;}21. fancy ampersand.amp {    font-family: baskerville, 'goudy old style', palatino, 'book antiqua', serif;    font-style: italic;    font-weight: normal;}22. drop-cap paragraphsp:first-letter{    display: block;    margin: 5px 0 0 5px;    float: left;    color: #ff3366;    font-size: 5.4em;    font-family: georgia, times new roman, serif;}23. inner css3 box shadow#mydiv {     -moz-box-shadow: inset 2px 0 4px #000;    -webkit-box-shadow: inset 2px 0 4px #000;    box-shadow: inset 2px 0 4px #000;}24. outer css3 box shadow#mydiv {     -webkit-box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);    -moz-box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);    box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);}25. triangular list bulletsul {    margin: 0.75em 0;    padding: 0 1em;    list-style: none;}li:before {     content: "";    border-color: transparent #111;    border-style: solid;    border-width: 0.35em 0 0.35em 0.45em;    display: block;    height: 0;    width: 0;    left: -1em;    top: 0.9em;    position: relative;}26. centered layout fixed width#page-wrap {    width: 800px;    margin: 0 auto;}27. css3 column text#columns-3 {    text-align: justify;    -moz-column-count: 3;    -moz-column-gap: 12px;    -moz-column-rule: 1px solid #c4c8cc;    -webkit-column-count: 3;    -webkit-column-gap: 12px;    -webkit-column-rule: 1px solid #c4c8cc;}28. css fixed footer#footer {    position: fixed;    left: 0px;    bottom: 0px;    height: 30px;    width: 100%;    background: #444;}/* ie 6 */* html #footer {    position: absolute;    top: expression((0-(footer.offsetheight)+(document.documentelement.clientheight ? document.documentelement.clientheight : document.body.clientheight)+(ignoreme = document.documentelement.scrolltop ? document.documentelement.scrolltop : document.body.scrolltop))+'px');}29. transparent png fix for ie6.bg {    width:200px;    height:100px;    background: url(/folder/yourimage.png) no-repeat;    _background:none;    _filter:progid:dximagetransform.microsoft.alphaimageloader(src='/folder/yourimage.png',sizingmethod='crop');}/* 1px gif method */img, .png {    position: relative;    behavior: expression((this.runtimestyle.behavior="none")&&(this.pngset?this.pngset=true:(this.nodename == "img" && this.src.tolowercase().indexof('.png')>-1?(this.runtimestyle.backgroundimage = "none",       this.runtimestyle.filter = "progid:dximagetransform.microsoft.alphaimageloader(src='" + this.src + "', sizingmethod='image')",       this.src = "images/transparent.gif"):(this.origbg = this.origbg? this.origbg :this.currentstyle.backgroundimage.tostring().replace('url("','').replace('")',''),       this.runtimestyle.filter = "progid:dximagetransform.microsoft.alphaimageloader(src='" + this.origbg + "', sizingmethod='crop')",       this.runtimestyle.backgroundimage = "none")),this.pngset=true));}30. cross-browser minimum height#container {    min-height: 550px;    height: auto !important;    height: 550px;}31. css3 glowing inputsinput[type=text], textarea {    -webkit-transition: all 0.30s ease-in-out;    -moz-transition: all 0.30s ease-in-out;    -ms-transition: all 0.30s ease-in-out;    -o-transition: all 0.30s ease-in-out;    outline: none;    padding: 3px 0px 3px 3px;    margin: 5px 1px 3px 0px;    border: 1px solid #ddd;}input[type=text]:focus, textarea:focus {    box-shadow: 0 0 5px rgba(81, 203, 238, 1);    padding: 3px 0px 3px 3px;    margin: 5px 1px 3px 0px;    border: 1px solid rgba(81, 203, 238, 1);}32. style links based on filetype/* external links */a[href^="http://"] {    padding-right: 13px;    background: url('external.gif') no-repeat center right;}/* emails */a[href^="mailto:"] {    padding-right: 20px;    background: url('email.png') no-repeat center right;}/* pdfs */a[href$=".pdf"] {    padding-right: 18px;    background: url('acrobat.png') no-repeat center right;}33. force code wrapspre {    white-space: pre-wrap;       /* css-3 */    white-space: -moz-pre-wrap;  /* mozilla, since 1999 */    white-space: -pre-wrap;      /* opera 4-6 */    white-space: -o-pre-wrap;    /* opera 7 */    word-wrap: break-word;       /* internet explorer 5.5+ */}34. force hand cursor over clickable itemsa[href], input[type='submit'], input[type='image'], label[for], select, button, .pointer {    cursor: pointer;}35. webpage top box shadowbody:before {    content: "";    position: fixed;    top: -10px;    left: 0;    width: 100%;    height: 10px;    -webkit-box-shadow: 0px 0px 10px rgba(0,0,0,.8);    -moz-box-shadow: 0px 0px 10px rgba(0,0,0,.8);    box-shadow: 0px 0px 10px rgba(0,0,0,.8);    z-index: 100;}36. css3 speech bubble.chat-bubble {    background-color: #ededed;    border: 2px solid #666;    font-size: 35px;    line-height: 1.3em;    margin: 10px auto;    padding: 10px;    position: relative;    text-align: center;    width: 300px;    -moz-border-radius: 20px;    -webkit-border-radius: 20px;    -moz-box-shadow: 0 0 5px #888;    -webkit-box-shadow: 0 0 5px #888;    font-family: 'bangers', arial, serif; }.chat-bubble-arrow-border {    border-color: #666 transparent transparent transparent;    border-style: solid;    border-width: 20px;    height: 0;    width: 0;    position: absolute;    bottom: -42px;    left: 30px;}.chat-bubble-arrow {    border-color: #ededed transparent transparent transparent;    border-style: solid;    border-width: 20px;    height: 0;    width: 0;    position: absolute;    bottom: -39px;    left: 30px;}37. default h1-h5 headersh1,h2,h3,h4,h5{    color: #005a9c;}h1{    font-size: 2.6em;    line-height: 2.45em;}h2{    font-size: 2.1em;    line-height: 1.9em;}h3{    font-size: 1.8em;    line-height: 1.65em;}h4{    font-size: 1.65em;    line-height: 1.4em;}h5{    font-size: 1.4em;    line-height: 1.25em;}38. pure css background noisebody {    background-image: url(data:image/png;base64,ivborw0kggoaaaansuheugaaadiaaaaycamaaaap4xidaaaauvbmvewfhywdg4n3d3dtbw17e3t1dxwbgyghh4d5exlzc3oli4ubm5uvlzwpj4+njy19fx2jiyl/f39ra2urkzgzmzlpawmxl5dvb29xcxgtk5nnz2c8tv1maaaag3rstlnaqebaqebaqebaqebaqebaqebaqebaqebaqeaveowtaaafvkleqvr4xpwwb67c2bufb3g557t/hro9/wumzhlgr4bg8z4qqgqjlhi4a8szfvrapvmtf9o7dmyrfz60yibhjrcgh1fyhilamdvx0cztopne77me0zty/nwwzchdtiqrmqdeuv3powq5ta2en0fy0inkqdd73lt9c9lezwunqgfhs9vqce3tvclfcqrstfoiykvjqbmpbq2l6izavpnapcou0dsw0sutqz/gtrguxfbyybnikykowqwgqwwma7qiyaxi+ilpdqo+hyhnut5zpfnshjynidtnpjyaynbkf6cwoygamy92u2hxhf/c1m8up/ztydiuj26udadqqsxqerwsomzt/xwrwaz5gusbikwg1h3fabj2osuouhgc6tk4emtjo0ttc6ibd3km0ve0tjwmdsfjzo+eeisaetr9p3wyrgjxqyc1krckdhmpxent5jetoulscpyzhxn5frpuphvbeqakxfaeb6en+cyn6xd7rygpxpnndmmzgm5dcs3ysnfdhuo2lgfzuukswyuyirjadybf3mfqekmjm+i2efha94ig3l7ukrr+gdwd73ydlib+6hgref1qtlmgmbm3/lex5gi1ux1rwpgxpluz2+i+ijzz8wqe4nilvqdkudfhzi5qdwy+kw5wgg2pgpeevecca7b85bo3f9dzxb3cdqvbzwcmzbymiqhzuyqthrvg2y4x+kolnyqla8aowwpuboyrxzxrfkuill6sfiwcbjxozjuacbj1cjh7giadbc9kqby3w/rgjda1iqqcoju2ww+76pzc9qg7m00dffe9hnnseupfl53r8f7yhswjwukp2q+k7rdsxyob11n0xtovnw4irmmfnv4h0uqws5exsmp9axbdtc9jwgneat5vtiusm1e7bsflst3bfa1tv8di3r8n3af7mnwzs49hmaue2wp+ttrq+aswpfg2awvsuoqbipwhgtuvuaae+a1z/7gc9hesnr+7wqcwg8c5yag3al1fm8t9aztp/bbjgwl1pnre7ruox7pemruervappes+yqeosmuolokqw49pgomjleh7ichnlg19yjs6xxomedym5xh2yxpv2tc0ro2jjfxc50apuxgob7lmsxftbeuv07tyyxpeluceh1gnd4ikh2lag5tdvhlcafzvpskfnccfx8pohjzd76bjweyfnfciwcyfubrc12ip/ppiha1/msz/rxjfdrjc5xiffjjpy2xl5zxdgufqyytr1zsp1y9p+tktdyysnflcxi0iyo4tpbdlrcpeqjk/pif5bklq77vseaa+z8qmjtfziwiitbnzr794uskbuat0ntesvjzqlafvqjopn9odg70ipbfbhkk+/q/awr0tjzyhruloa4mp+w/hfgadzubfw177g7j/ogbis8tahlyynl4x4rinf793oz+bu0saxtuhrvbft/dna3ctnpogbs4hrijtok8i+algt1lthi4sxfvonknrgqfaq2/gfnwmxgwffgymjpikykmw3ttg3zq9jq+f8xn+a5eeukhwvjwj2sgj1sop+wwhqfvijqwajhwtd8mnlsbewnnwta5z5kpzw5+lbvt99wqtdx29lmuh4oig/d86rukeaubjvh5xy6um/sfj7ei6uuvk4ail3myd4msstofgswsh/qjwaq5as7zcmgbzkzjju1urq74ci1gwbcsghtuv1h2mhsno3wp/3fev5a+4wz//6qy8jxjzsmxxy5+4w9cdnjy09t072ikg0enos0areygxqynxcyhwjttunacmelod4xpkoqityicwfq0jsipfpdqdnt+4/wuqcxy47qilbgaaaabjru5erkjggg==);    background-color: #0094d0;}39. continued list orderingol.chapters {    list-style: none;    margin-left: 0;}ol.chapters > li:before {    content: counter(chapter) ". ";    counter-increment: chapter;    font-weight: bold;    float: left;    width: 40px;}ol.chapters li {    clear: left;}ol.start {    counter-reset: chapter;}ol.continue {    counter-reset: chapter 11;}40. css tooltip hoversa {     border-bottom:1px solid #bbb;    color:#666;    display:inline-block;    position:relative;    text-decoration:none;}a:hover,a:focus {    color:#36c;}a:active {    top:1px; }/* tooltip styling */a[data-tooltip]:after {    border-top: 8px solid #222;    border-top: 8px solid hsla(0,0%,0%,.85);    border-left: 8px solid transparent;    border-right: 8px solid transparent;    content: "";    display: none;    height: 0;    width: 0;    left: 25%;    position: absolute;}a[data-tooltip]:before {    background: #222;    background: hsla(0,0%,0%,.85);    color: #f6f6f6;    content: attr(data-tooltip);    display: none;    font-family: sans-serif;    font-size: 14px;    height: 32px;    left: 0;    line-height: 32px;    padding: 0 15px;    position: absolute;    text-shadow: 0 1px 1px hsla(0,0%,0%,1);    white-space: nowrap;    -webkit-border-radius: 5px;    -moz-border-radius: 5px;    -o-border-radius: 5px;    border-radius: 5px;}a[data-tooltip]:hover:after {    display: block;    top: -9px;}a[data-tooltip]:hover:before {    display: block;    top: -41px;}a[data-tooltip]:active:after {    top: -10px;}a[data-tooltip]:active:before {    top: -42px;}41. dark grey rounded buttons.graybtn {    -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;    -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;    box-shadow:inset 0px 1px 0px 0px #ffffff;    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #d1d1d1) );    background:-moz-linear-gradient( center top, #ffffff 5%, #d1d1d1 100% );    filter:progid:dximagetransform.microsoft.gradient(startcolorstr='#ffffff', endcolorstr='#d1d1d1');    background-color:#ffffff;    -moz-border-radius:6px;    -webkit-border-radius:6px;    border-radius:6px;    border:1px solid #dcdcdc;    display:inline-block;    color:#777777;    font-family:arial;    font-size:15px;    font-weight:bold;    padding:6px 24px;    text-decoration:none;    text-shadow:1px 1px 0px #ffffff;}.graybtn:hover {    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d1d1d1), color-stop(1, #ffffff) );    background:-moz-linear-gradient( center top, #d1d1d1 5%, #ffffff 100% );    filter:progid:dximagetransform.microsoft.gradient(startcolorstr='#d1d1d1', endcolorstr='#ffffff');    background-color:#d1d1d1;}.graybtn:active {    position:relative;    top:1px;}42. display urls in a printed webpage@media print   {    a:after {      content: " [" attr(href) "] ";    }  }43. disable mobile webkit highlightsbody {    -webkit-touch-callout: none;    -webkit-user-select: none;    -khtml-user-select: none;    -moz-user-select: none;    -ms-user-select: none;    user-select: none;}44. css3 polka-dot patternbody {    background: radial-gradient(circle, white 10%, transparent 10%),    radial-gradient(circle, white 10%, black 10%) 50px 50px;    background-size: 100px 100px;}45. css3 checkered patternbody {    background-color: white;    background-image: linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black),     linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black);    background-size: 100px 100px;    background-position: 0 0, 50px 50px;}46. github fork ribbon.ribbon {    background-color: #a00;    overflow: hidden;    /* top left corner */    position: absolute;    left: -3em;    top: 2.5em;    /* 45 deg ccw rotation */    -moz-transform: rotate(-45deg);    -webkit-transform: rotate(-45deg);    /* shadow */    -moz-box-shadow: 0 0 1em #888;    -webkit-box-shadow: 0 0 1em #888;}.ribbon a {    border: 1px solid #faa;    color: #fff;    display: block;    font: bold 81.25% 'helvetiva neue', helvetica, arial, sans-serif;    margin: 0.05em 0 0.075em 0;    padding: 0.5em 3.5em;    text-align: center;    text-decoration: none;    /* shadow */    text-shadow: 0 0 0.5em #444;}47. condensed css font propertiesp {  font: italic small-caps bold 1.2em/1.0em arial, tahoma, helvetica;}48. paper page curl effectul.box {    position: relative;    z-index: 1; /* prevent shadows falling behind containers with backgrounds */    overflow: hidden;    list-style: none;    margin: 0;    padding: 0; }ul.box li {    position: relative;    float: left;    width: 250px;    height: 150px;    padding: 0;    border: 1px solid #efefef;    margin: 0 30px 30px 0;    background: #fff;    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; }ul.box li:before,ul.box li:after {    content: '';    z-index: -1;    position: absolute;    left: 10px;    bottom: 10px;    width: 70%;    max-width: 300px; /* avoid rotation causing ugly appearance at large container widths */    max-height: 100px;    height: 55%;    -webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);    -moz-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);    -webkit-transform: skew(-15deg) rotate(-6deg);    -moz-transform: skew(-15deg) rotate(-6deg);    -ms-transform: skew(-15deg) rotate(-6deg);    -o-transform: skew(-15deg) rotate(-6deg);    transform: skew(-15deg) rotate(-6deg); }ul.box li:after {    left: auto;    right: 10px;    -webkit-transform: skew(15deg) rotate(6deg);    -moz-transform: skew(15deg) rotate(6deg);    -ms-transform: skew(15deg) rotate(6deg);    -o-transform: skew(15deg) rotate(6deg);    transform: skew(15deg) rotate(6deg); }49. glowing anchor linksa {    color: #00e;}a:visited {    color: #551a8b;}a:hover {    color: #06e;}a:focus {    outline: thin dotted;}a:hover, a:active {    outline: 0;}a, a:visited, a:active {    text-decoration: none;    color: #fff;    -webkit-transition: all .3s ease-in-out;}a:hover, .glow {    color: #ff0;    text-shadow: 0 0 10px #ff0;}50. featured css3 display banner.featurebanner {    position: relative;    margin: 20px}.featurebanner:before {    content: "featured";    position: absolute;    top: 5px;    left: -8px;    padding-right: 10px;    color: #232323;    font-weight: bold;    height: 0px;    border: 15px solid #ffa200;    border-right-color: transparent;    line-height: 0px;    box-shadow: -0px 5px 5px -5px #000;    z-index: 1;}.featurebanner:after {    content: "";    position: absolute;    top: 35px;    left: -8px;    border: 4px solid #89540c;    border-left-color: transparent;    border-bottom-color: transparent;}

转载自:http://www.9958.pw/post/css_50_useful

BibiGPT-哔哔终结者
BibiGPT-哔哔终结者

B站视频总结器-一键总结 音视频内容

下载
HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载

本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

通义千问
通义千问

阿里巴巴推出的全能AI助手

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
俄罗斯Yandex引擎入口
俄罗斯Yandex引擎入口

2026年俄罗斯Yandex搜索引擎最新入口汇总,涵盖免登录、多语言支持、无广告视频播放及本地化服务等核心功能。阅读专题下面的文章了解更多详细内容。

178

2026.01.28

包子漫画在线官方入口大全
包子漫画在线官方入口大全

本合集汇总了包子漫画2026最新官方在线观看入口,涵盖备用域名、正版无广告链接及多端适配地址,助你畅享12700+高清漫画资源。阅读专题下面的文章了解更多详细内容。

35

2026.01.28

ao3中文版官网地址大全
ao3中文版官网地址大全

AO3最新中文版官网入口合集,汇总2026年主站及国内优化镜像链接,支持简体中文界面、无广告阅读与多设备同步。阅读专题下面的文章了解更多详细内容。

79

2026.01.28

php怎么写接口教程
php怎么写接口教程

本合集涵盖PHP接口开发基础、RESTful API设计、数据交互与安全处理等实用教程,助你快速掌握PHP接口编写技巧。阅读专题下面的文章了解更多详细内容。

2

2026.01.28

php中文乱码如何解决
php中文乱码如何解决

本文整理了php中文乱码如何解决及解决方法,阅读节专题下面的文章了解更多详细内容。

4

2026.01.28

Java 消息队列与异步架构实战
Java 消息队列与异步架构实战

本专题系统讲解 Java 在消息队列与异步系统架构中的核心应用,涵盖消息队列基本原理、Kafka 与 RabbitMQ 的使用场景对比、生产者与消费者模型、消息可靠性与顺序性保障、重复消费与幂等处理,以及在高并发系统中的异步解耦设计。通过实战案例,帮助学习者掌握 使用 Java 构建高吞吐、高可靠异步消息系统的完整思路。

8

2026.01.28

Python 自然语言处理(NLP)基础与实战
Python 自然语言处理(NLP)基础与实战

本专题系统讲解 Python 在自然语言处理(NLP)领域的基础方法与实战应用,涵盖文本预处理(分词、去停用词)、词性标注、命名实体识别、关键词提取、情感分析,以及常用 NLP 库(NLTK、spaCy)的核心用法。通过真实文本案例,帮助学习者掌握 使用 Python 进行文本分析与语言数据处理的完整流程,适用于内容分析、舆情监测与智能文本应用场景。

24

2026.01.27

拼多多赚钱的5种方法 拼多多赚钱的5种方法
拼多多赚钱的5种方法 拼多多赚钱的5种方法

在拼多多上赚钱主要可以通过无货源模式一件代发、精细化运营特色店铺、参与官方高流量活动、利用拼团机制社交裂变,以及成为多多进宝推广员这5种方法实现。核心策略在于通过低成本、高效率的供应链管理与营销,利用平台社交电商红利实现盈利。

122

2026.01.26

edge浏览器怎样设置主页 edge浏览器自定义设置教程
edge浏览器怎样设置主页 edge浏览器自定义设置教程

在Edge浏览器中设置主页,请依次点击右上角“...”图标 > 设置 > 开始、主页和新建标签页。在“Microsoft Edge 启动时”选择“打开以下页面”,点击“添加新页面”并输入网址。若要使用主页按钮,需在“外观”设置中开启“显示主页按钮”并设定网址。

72

2026.01.26

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号