zoukankan      html  css  js  c++  java
  • 前端常见BUG--css篇,及处理方法(持续更新)

    前端常见样式bug,及处理方法:

    【2015-09-10】

    a,input,textarea,img标签点击后出现虚框,黄框等;

    a{outline:none;}

    去苹果浏览器默认样式

    input,textarea,button { -webkit-appearance: none; border-radius:0px; border:none;}

    a有click等事件,href写法

    href="javascript:void(0)"
    //Bootstrap模态框,不然jQuery报错
    href="#"

    及时清除浮动

    //调Bootstrap直接加入样式:class="clearfix",没调请加入下面样式
    .clearfix:before,.clearfix:after{content: " ";display: table;}
    .clearfix:after { clear: both;}

    css禁止选中

    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -khtml-user-select: none;
    user-select: none;

    【2015-09-25】

    苹果中css圆与背景图片有时不显示

    • 原因:
      1.苹果浏览器中图片背景要显示该div中必须要有内容
      2.苹果浏览器中css圆需要line-height撑开大小与高度一样,否则会是椭圆
    • 解决方法如下:
    <div style="50px;height:50px;line-height: 50px;border-radius: 50%;background-color: #2090ff;background-image: url(http://www.l2cplat.com/email_img/20150916/12.png);background-repeat: no-repeat;background-position:center;float: left;">&nbsp;</div>
  • 相关阅读:
    加载与隐藏显示
    Task 自我总结认知
    修复SDF数据库引擎C#代码
    Windows防火墙开启后 ping不通了 的解决方案
    C# 串口
    WPF DataGrid中单元格运用Combobox的示例
    组合模式
    适配器模式
    【转载】.net 动态代理
    python数组操作
  • 原文地址:https://www.cnblogs.com/mcdnf/p/5158242.html
Copyright © 2011-2022 走看看