我正在使用此A标签来创建一堆不同的可点击项。单击一个后,如果将鼠标悬停在项目上,原始图标将带下划线。我一直在尝试很多不同的事情,没有什么能阻止下划线。它不是活跃的,访问过的或悬停的,但它似乎是这些的混合
我使用了SASS预处理器和bootstrap 3.实时链接在这里:
http://jsbin.com/yavafenasi/edit?html,css,js,console,output
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<title>JS Bin</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div id="search_options">
<a href="https://en.wikipedia.org/?curid=24768" target="_blank" class="search_results">
<div>
<h3>Stuff 1</h3>
<p>words</p>
</div>
</a>
<a href="https://en.wikipedia.org/wiki/Flatbread" target="_blank" class="search_results">
<div>
<h3>stuff 2</h3>
<p>words</p>
</div>
</a>
<a href="https://en.wikipedia.org/wiki/bread" target="_blank" class="search_results">
<div>
<h3>stuff3</h3>
<p>words</p>
</div>
</a>
</div>
</div>
</div>
<!--row-->
</div>
<!--container-->
</body>
</html>
SCSS预处理:
.search_results
{
> div
{
margin-bottom: 25px;
padding:1px 0px 2px 4px;
-webkit-box-shadow: 0px 1px 16px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 1px 16px 0px rgba(0,0,0,0.2);
box-shadow: 0px 1px 16px 0px rgba(0,0,0,0.2);
border: 1px grey;
border-radius: 2px;
text-decoration: none !important;
color: black;
}
p, h3
{
text-decoration: none;
}
h3:hover, p:hover, &:hover, h3:active, p:active, &:active, div:hover, div:active, &:visited, p:visited, h3:visited
{
text-decoration: none !important;
}
}
CSS编译和缩小:
.search_results>div{margin-bottom:25px;padding:1px 0px 2px 4px;-webkit-box-shadow:0px 1px 16px 0px rgba(0,0,0,0.2);-moz-box-shadow:0px 1px 16px 0px rgba(0,0,0,0.2);box-shadow:0px 1px 16px 0px rgba(0,0,0,0.2);border:1px grey;border-radius:2px;text-decoration:none !important;color:black}.search_results p,.search_results h3{text-decoration:none}.search_results h3:hover,.search_results p:hover,.search_results:hover,.search_results h3:active,.search_results p:active,.search_results:active,.search_results div:hover,.search_results div:active,.search_results:visited,.search_results p:visited,.search_results h3:visited{text-decoration:none !important}
答案 0 :(得分:0)
.search_results>div{margin-bottom:25px;padding:1px 0px 2px 4px;-webkit-box-shadow:0px 1px 16px 0px rgba(0,0,0,0.2);-moz-box-shadow:0px 1px 16px 0px rgba(0,0,0,0.2);box-shadow:0px 1px 16px 0px rgba(0,0,0,0.2);border:1px grey;border-radius:2px;text-decoration:none !important;color:black}.search_results p,.search_results h3{text-decoration:none}.search_results h3:hover,.search_results p:hover,.search_results:hover,.search_results h3:active,.search_results p:active,.search_results:active,.search_results div:hover,.search_results div:active,.search_results:visited,.search_results p:visited,.search_results h3:visited{text-decoration:none !important}
/*Add this to your css*/
a, a:hover, a:active, a:visited, a:focus {
text-decoration:none !important;
}
&#13;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<title>JS Bin</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div id="search_options">
<a href="https://en.wikipedia.org/?curid=24768" target="_blank" class="search_results">
<div>
<h3>Stuff 1</h3>
<p>words</p>
</div>
</a>
<a href="https://en.wikipedia.org/wiki/Flatbread" target="_blank" class="search_results">
<div>
<h3>stuff 2</h3>
<p>words</p>
</div>
</a>
<a href="https://en.wikipedia.org/wiki/bread" target="_blank" class="search_results">
<div>
<h3>stuff3</h3>
<p>words</p>
</div>
</a>
</div>
</div>
</div>
<!--row-->
</div>
<!--container-->
</body>
</html>
&#13;
答案 1 :(得分:0)
锚标记$rule = ['appended', 'appended'];
Excel::selectSheetsByIndex(1)->load(public_path('uploads') . '/data.xlsx', function ($reader) use ($rule) {
$reader->sheet('Sheetname', function ($sheet) use ($rule) {
// Append row as very last
$sheet->appendRow($rule);
});
}, 'UTF-8')->store('xlsx', true);
的焦点在这里产生问题,
<a>
以下是最终代码:
http://jsbin.com/wejehazoxe/1/edit?html,css,js,output
https://codepen.io/eirenaios/pen/GmmxBZ
您正在从h3删除下划线,但它来自锚标记,因此您的SCSS将是:
a:focus, a:hover {
color: #23527c;
text-decoration: underline;
}
以下是创建下划线的锚标记的检查元素的屏幕截图。