随机橙色边框出现在android上

时间:2015-10-10 23:59:07

标签: android html css twitter-bootstrap

每次点击Home.html页面中任意标签的div时,我都会遇到有关橙色边框的问题。我真的试图通过多种方式去除边界,但似乎它没有成功。我已经尝试了outline:none !important,但它对我没有用,但它适用于上一页。我正在使用bootstrap类。 ..如果有人可以提供帮助,请告诉我这是什么解决方案。提前谢谢。



.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
	color:#FFFF00;
	background-color: #323232;
	border: 1px solid #ffff00;
    border-bottom-color: transparent;
    outline: none !important;
	}
	.nav-tabs > li > a{
	color:#FFFF00;
	background-color: #323232;
	outline: none !important;
	}
	
	.nav > li > a:hover,
.nav > li > a:focus {
	background-color: #323232;
      color: #ffff00;
      outline: none !important;
	}
	
	.nav-tabs{
	background-color: #323232;
	outline: none !important;
	}
	
	
	.nav .open > a, .nav .open > a:hover, .nav .open > a:focus{
		background-color: #323232;
      color: #ffff00;
      border-color: transparent;
      outline: none !important;
	}
	
	
	
	.dropdown-menu > li > a:hover,.dropdown-menu > li > a, .dropdown-menu > li > a:focus{
		background-color: #323232;
      color: #ffff00;
      border-color: #ffff00;
      outline: none !important;
	}
	
	.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus{
		background-color: #323232;
		color: #ffff00;
		outline: none !important;
	}

<!--HTML CODE-->

<!DOCTYPE html>
<html>
<head>
<title>HomePage</title>
<link rel= 'stylesheet' href='css/bootstrap.css' />
<link rel= 'stylesheet' href='css/font-awesome.min.css' />
 <link rel= 'stylesheet' href='css/home.css' />
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
</head>
 
<body onload="loadstring()">

<!-- Nav bar for switching tabs -->
<div class="Homenavbar">
    <ul class="nav nav-tabs">
        <li class="active"><a data-toggle="tab" href="#sectionA"><i class="fa fa-home"></i>Home</a></li>
        <li><a data-toggle="tab" href="#sectionB">Section B</a></li>
        <li class="dropdown">
            <a data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a data-toggle="tab" href="#dropdown1">Dropdown1</a></li>
                <li><a data-toggle="tab" href="#dropdown2">Dropdown2</a></li>
            </ul>
        </li>
    </ul>
    <div class="tab-content">
        <div id="sectionA" class="tab-pane fade in active">
            <h3>Section A</h3>
            <p>Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui. Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth.</p>
        </div>
        <div id="sectionB" class="tab-pane fade">
            <h3>Section B</h3>
            <p>Vestibulum nec erat eu nulla rhoncus fringilla ut non neque. Vivamus nibh urna, ornare id gravida ut, mollis a magna. Aliquam porttitor condimentum nisi, eu viverra ipsum porta ut. Nam hendrerit bibendum turpis, sed molestie mi fermentum id. Aenean volutpat velit sem. Sed consequat ante in rutrum convallis. Nunc facilisis leo at faucibus adipiscing.</p>
        </div>
        <div id="dropdown1" class="tab-pane fade">
            <h3>Dropdown 1</h3>
            <p>WInteger convallis, nulla in sollicitudin placerat, ligula enim auctor lectus, in mollis diam dolor at lorem. Sed bibendum nibh sit amet dictum feugiat. Vivamus arcu sem, cursus a feugiat ut, iaculis at erat. Donec vehicula at ligula vitae venenatis. Sed nunc nulla, vehicula non porttitor in, pharetra et dolor. Fusce nec velit velit. Pellentesque consectetur eros.</p>
        </div>
        <div id="dropdown2" class="tab-pane fade">
            <h3>Dropdown 2</h3>
            <p>Donec vel placerat quam, ut euismod risus. Sed a mi suscipit, elementum sem a, hendrerit velit. Donec at erat magna. Sed dignissim orci nec eleifend egestas. Donec eget mi consequat massa vestibulum laoreet. Mauris et ultrices nulla, malesuada volutpat ante. Fusce ut orci lorem. Donec molestie libero in tempus imperdiet. Cum sociis natoque penatibus et magnis.</p>
        </div>
    </div>
</div>
    <!-- End nav bar -->

 
<script src="js/jquery-2.1.4.min.js"> </script>
<script src="js/jquery.mobile-1.4.5.min.js"> </script> 
<script src="js/bootstrap.min.js"> </script>
<script src="js/home.js"></script>
</body>
</html>
&#13;
&#13;
&#13;

3 个答案:

答案 0 :(得分:0)

从CSS中删除border: 1px solid #ffff00;。这将删除选项卡周围的黄色边框。

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
	color:#FFFF00;
	background-color: #323232;
    border-bottom-color: transparent;
    outline: none !important;
	}
	.nav-tabs > li > a{
	color:#FFFF00;
	background-color: #323232;
	outline: none !important;
	}
	
	.nav > li > a:hover,
.nav > li > a:focus {
	background-color: #323232;
      color: #ffff00;
      outline: none !important;
	}
	
	.nav-tabs{
	background-color: #323232;
	outline: none !important;
	}
	
	
	.nav .open > a, .nav .open > a:hover, .nav .open > a:focus{
		background-color: #323232;
      color: #ffff00;
      border-color: transparent;
      outline: none !important;
	}
	
	
	
	.dropdown-menu > li > a:hover,.dropdown-menu > li > a, .dropdown-menu > li > a:focus{
		background-color: #323232;
      color: #ffff00;
      border-color: #ffff00;
      outline: none !important;
	}
	
	.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus{
		background-color: #323232;
		color: #ffff00;
		outline: none !important;
	}
<!--HTML CODE-->

<!DOCTYPE html>
<html>
<head>
<title>HomePage</title>
<link rel= 'stylesheet' href='css/bootstrap.css' />
<link rel= 'stylesheet' href='css/font-awesome.min.css' />
 <link rel= 'stylesheet' href='css/home.css' />
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
</head>
 
<body onload="loadstring()">

<!-- Nav bar for switching tabs -->
<div class="Homenavbar">
    <ul class="nav nav-tabs">
        <li class="active"><a data-toggle="tab" href="#sectionA"><i class="fa fa-home"></i>Home</a></li>
        <li><a data-toggle="tab" href="#sectionB">Section B</a></li>
        <li class="dropdown">
            <a data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a data-toggle="tab" href="#dropdown1">Dropdown1</a></li>
                <li><a data-toggle="tab" href="#dropdown2">Dropdown2</a></li>
            </ul>
        </li>
    </ul>
    <div class="tab-content">
        <div id="sectionA" class="tab-pane fade in active">
            <h3>Section A</h3>
            <p>Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui. Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth.</p>
        </div>
        <div id="sectionB" class="tab-pane fade">
            <h3>Section B</h3>
            <p>Vestibulum nec erat eu nulla rhoncus fringilla ut non neque. Vivamus nibh urna, ornare id gravida ut, mollis a magna. Aliquam porttitor condimentum nisi, eu viverra ipsum porta ut. Nam hendrerit bibendum turpis, sed molestie mi fermentum id. Aenean volutpat velit sem. Sed consequat ante in rutrum convallis. Nunc facilisis leo at faucibus adipiscing.</p>
        </div>
        <div id="dropdown1" class="tab-pane fade">
            <h3>Dropdown 1</h3>
            <p>WInteger convallis, nulla in sollicitudin placerat, ligula enim auctor lectus, in mollis diam dolor at lorem. Sed bibendum nibh sit amet dictum feugiat. Vivamus arcu sem, cursus a feugiat ut, iaculis at erat. Donec vehicula at ligula vitae venenatis. Sed nunc nulla, vehicula non porttitor in, pharetra et dolor. Fusce nec velit velit. Pellentesque consectetur eros.</p>
        </div>
        <div id="dropdown2" class="tab-pane fade">
            <h3>Dropdown 2</h3>
            <p>Donec vel placerat quam, ut euismod risus. Sed a mi suscipit, elementum sem a, hendrerit velit. Donec at erat magna. Sed dignissim orci nec eleifend egestas. Donec eget mi consequat massa vestibulum laoreet. Mauris et ultrices nulla, malesuada volutpat ante. Fusce ut orci lorem. Donec molestie libero in tempus imperdiet. Cum sociis natoque penatibus et magnis.</p>
        </div>
    </div>
</div>
    <!-- End nav bar -->

 
<script src="js/jquery-2.1.4.min.js"> </script>
<script src="js/jquery.mobile-1.4.5.min.js"> </script> 
<script src="js/bootstrap.min.js"> </script>
<script src="js/home.js"></script>
</body>
</html>

答案 1 :(得分:0)

我认为这应该有效:

a {
   outline: 0;
}

有关此内容的更多信息,请访问: https://css-tricks.com/removing-the-dotted-outline/

同时删除要添加到li元素的边框:

border: 1px solid #ffff00;

这应该被移除...当您点击链接时将其放在focus上,这样它就会添加边框...将其移除并确定无效。

答案 2 :(得分:0)

伙计们,我找到了这个随机橙色边框的解决方案..你需要做的就是将它放在CSS文件中

&#13;
&#13;
div{
	outline:none !important;
}
&#13;
&#13;
&#13;