欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    css十个经典案例.pdf

    • 资源ID:76258752       资源大小:174.40KB        全文页数:10页
    • 资源格式: PDF        下载积分:20金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要20金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    css十个经典案例.pdf

    The top 10 most useful css snippets of today.I have noticed myself to use a few different code snippets on a daily basis so I thought some of you might find them useful.So here we go.1.Centering a website(or other elements)The HTML view plaincopy to clipboardprint?1.2.3.4.The CSS view plaincopy to clipboardprint?1.wrap width:960px;margin:0 auto;This is an oldie,but apperantly it is not as obvious as you would think.2.Sticky Footer(make footer always be on bottom without absolute positioning)The HTML view plaincopy to clipboardprint?1.2.3.4.5.6.The CSS view plaincopy to clipboardprint?1.*margin:0;padding:0;2.html,body,#wrap height:100%;3.body#wrap height:auto;min-height:100%;4.#main padding-bottom:150px;/*must be same height as the footer*/5.#footer 6.position:relative;7.margin-top:-150px;/*negative value of footer height*/8.height:150px;9.clear:both;10./*CLEAR FIX*/11.clearfix:after content:.;12.display:block;13.height:0;14.clear:both;15.visibility:hidden;16.clearfix display:inline-block;17./*Hides from IE-mac*/18.*html.clearfix height:1%;19.clearfix display:block;20./*End hide from IE-mac*/As of recently i have had to use this over 50 times i think this is one of the most important tricks you will learn today.3.Cross-Browser Min HeightThe CSS view plaincopy to clipboardprint?1.element min-height:600px;height:auto !important;height:600px;You can replace the min-height and heigth with 12em or another value that works for you.4.Box Shadow(CSS3)The CSS view plaincopy to clipboardprint?1.box box-shadow:5px5px5px#666;-moz-box-shadow:5px5px 5px#666;-webkit-box-shadow:5px 5px5px#666;As you can see since this is a CSS3 property you will need all the three commands to make it cross browser(except for ie of course).The first 2 measurements are for horizontal offset and the vertical offset.The third number is for the blur radius.And the last is the color of the shadow.5.Text Shadow(CSS3)with IE hackThe CSS view plaincopy to clipboardprint?1.text text-shadow:1px1px1px#666;filter:Shadow(Color=#666666,Direction=135,Strength=5);This technique is great for all modern browsers,the IE fix works but it is not amazing quality.6.Cross Browser CSS OpacityThe CSS view plaincopy to clipboardprint?1.transparent 2./*Modern Browsers*/opacity:0.7;3./*IE 8*/-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);4./*IE 5-7*/filter:alpha(opacity=70);5./*Netscape*/-moz-opacity:0.7;6./*Safari 1*/-khtml-opacity:0.7;7.Opacity can be used for plenty of elements,it adds a certain new age style we all strive for.Notice that in some browsers transperancy is inherited by all child elements!7.The Famous Meyer ResetThe CSS view plaincopy to clipboardprint?1.html,body,div,span,applet,object,iframe,2.h1,h2,h3,h4,h5,h6,p,blockquote,pre,3.a,abbr,acronym,address,big,cite,code,4.del,dfn,em,font,img,ins,kbd,q,s,samp,5.small,strike,strong,sub,sup,tt,var,6.dl,dt,dd,ol,ul,li,7.fieldset,form,label,legend,8.table,caption,tbody,tfoot,thead,tr,th,td 9.margin:0;10.padding:0;11.border:0;12.outline:0;13.font-weight:inherit;14.font-style:inherit;15.font-size:100%;16.font-family:inherit;17.vertical-align:baselinebaseline;18.19./*remember to define focus styles!*/20.:focus 21.outline:0;22.23.body 24.line-height:1;25.color:black;26.background:white;27.28.ol,ul 29.list-style:none;30.31./*tables still need cellspacing=0 in the markup*/32.table 33.border-collapse:separate;34.border-spacing:0;35.36.caption,th,td 37.text-align:left;38.font-weight:normal;39.40.blockquote:before,blockquote:after,41.q:before,q:after 42.content:;43.44.blockquote,q 45.quotes:;46.This is the most useful css reset out there,i use it for almost everything I work on(even the 52framework,coming soon).8.Removing the dotted outlinesThe CSS view plaincopy to clipboardprint?1.a,a:active outline:none;I find myself getting very annoyed with the dotted outline(especially for text-indented elements that are off the page).9.Rounded Corners(non ie)The CSS view plaincopy to clipboardprint?1.element 2.-moz-border-radius:5px;3.-webkit-border-radius:5px;4.border-radius:5px;/*future proofing*/5.6.element-top-left-corner 7.-moz-border-radius-topleft:5px;8.-webkit-border-top-left-radius:5px;9.Love rounded corners?Dont want to slave over images and elements to get the effect?This is your solution,and elements still look fine in ie.10.Override Inline StylesThe CSS view plaincopy to clipboardprint?1.override 2.font-size:14px !important;3.This comes in handy plenty of times,I personally use it way too much everyt ime something doesnt work I test if its just not being applied because of some other style.

    注意事项

    本文(css十个经典案例.pdf)为本站会员(索****)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开