Skip to content
静心静心
HOME
DoubtfulCases
github icon
  • CSS

    • 标签
      • a标签
        • Label 标签
          • background
            • background属性
              • border和outline
                • borderAndoutline
                  • css - padding
                    • css 单位
                      • css 所有的居中(仅限参考)
                        • CSS 之 重构 回流
                          • Css选择器 权重
                            • css选择器
                              • CSS之阴影
                                • css之float
                                  • css重点
                                    • grid布局
                                      • HTML基础标签+表单
                                        • table布局

                                        A 标签

                                        author iconYYtimer icon小于 1 分钟

                                        # A 标签

                                        # 1、取消a标签在移动端点击时的蓝色

                                        😛😛😛😛😛😛😛😛😛

                                        a {
                                        	-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
                                        	-webkit-user-select: none;
                                        	-moz-user-focus: none;
                                            -moz-user-select: none;
                                        }
                                        
                                        
                                        1
                                        2
                                        3
                                        4
                                        5
                                        6
                                        7

                                        # 2、使用图片作为a标签的点击按钮时,当触发touchstart的时候,往往会有一个灰色的背景

                                        a,a:hover,a:active,a:visited,a:link,a:focus{
                                            -webkit-tap-highlight-color:rgba(0,0,0,0);
                                            -webkit-tap-highlight-color: transparent;
                                            outline:none;
                                            background: none;
                                            text-decoration: none;
                                        }
                                        
                                        1
                                        2
                                        3
                                        4
                                        5
                                        6
                                        7

                                        # 3、改变选中内容的背景颜色

                                        ::selection { 
                                            background: #FFF; 
                                            color: #333; 
                                        } 
                                        ::-moz-selection { 
                                            background: #FFF; 
                                            color: #333; 
                                        } 
                                        ::-webkit-selection { 
                                            background: #FFF; 
                                            color: #333; 
                                        }
                                        
                                        1
                                        2
                                        3
                                        4
                                        5
                                        6
                                        7
                                        8
                                        9
                                        10
                                        11
                                        12

                                        # 4、去除ios input框点击时的灰色背景

                                        -webkit-tap-highlight-color:rgba(0,0,0,0);
                                        
                                        1

                                        # 5、去除ios中图片被选中时的蓝色背景c

                                        img {
                                        	-webkit-tap-highlight-color:rgba(0,0,0,0);
                                        	-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
                                        	-webkit-user-select: none;
                                        	-moz-user-focus: none;
                                        	-moz-user-select: none;
                                        	user-select: none;
                                        }
                                        
                                        1
                                        2
                                        3
                                        4
                                        5
                                        6
                                        7
                                        8
                                        edit icon编辑此页open in new window
                                        下一页
                                        a标签
                                        傻瓜都能写出计算机可以理解的代码。唯有能写出人类容易理解的代码的,才是优秀的程序员。
                                        Copyright © 2022 YY

                                        该应用可以安装在您的 PC 或移动设备上。这将使该 Web 应用程序外观和行为与其他应用程序相同。它将在出现在应用程序列表中,并可以固定到主屏幕,开始菜单或任务栏。此 Web 应用程序还将能够与其他应用程序和您的操作系统安全地进行交互。

                                        详情