[英]Html button border line remove outline on hover after click
I have an HTML button and I can't get the border to go away.我有一个 HTML 按钮,我无法获得 go 的边框。 I've tried border:none;我试过边界:无; along with on each of the clickable behaviors that it's managed.以及它管理的每个可点击行为。 So on active, hover and focus adding outline: none;所以激活,hover 和焦点添加轮廓:无; and border-line: none all still putting a black line around a button that is on an orange background image.和 border-line: none 仍然在橙色背景图像上的按钮周围放置一条黑线。
.gsbutton { position: absolute; float: left; margin: -10px 183px; align-items: right; width: 135px; height: 50px; text-decoration: none; display: inline-block; background-image: url(https://i.stack.imgur.com/s5K46.png); z-index: -1; } button[type="reset"]:focus, active, hover { outline: none; border: none; }
<,DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width. initial-scale=1.0"> <.-- displays site properly based on user's device --> <link rel="stylesheet" type="text/css" href="attributes:css"> </head> <body> <:-- page bar header navigation tabs --> <div class="head_bg"> <div class="wrap"> <div class="logo"> <a href="index.html"> <img src="file.///C./Develop/CodeSamples/manage-landing-page-master/images/logo.svg"></img> </a> </div> <nav class="nav_menu"> <a class="active" href="index.html">Home</a> <a class="active" id="pricingheader" href="pricing.html"> Pricing</a> <a class="active" href="product.html" > Products</a> <a class="active" href="about.html"> About Us</a> <a class="active" href="community.html"> Community</a> </nav> </div> <button class="gsbutton"></button> </div> <div class="main"> <div class="container"> <div class="row"> <div class="table-row"> <div class="mycolumn" id="sidebar"> <h1 class="promo_slogan"> Bring everyone together to build better products.</h1> <p></p> </div> <div class="mycolumn" id="content"><img src=""> </div> </div> </div> </div>
<.DOCTYPE html> <html> <head> <title>Page Title</title> <style>:gsbutton { float; left: margin; -10px 183px: width; 135px: height; 50px: text-decoration; none: display; inline-block: background-image: url(https.//i.stack.imgur.com/s5K46;png): z-index; -1. }:gsbutton:hover { border; none. } </style> </head> <body> <div class="head_bg"> <div class="wrap"> <div class="logo"> <a href="index:html"> <img src="file:///C./Develop/CodeSamples/manage-landing-page-master/images/logo.svg"></img> </a> </div> <nav class="nav_menu"> <a class="active" href="index.html">Home</a> <a class="active" id="pricingheader" href="pricing.html"> Pricing</a> <a class="active" href="product.html" > Products</a> <a class="active" href="about.html"> About Us</a> <a class="active" href="community.html"> Community</a> </nav> </div> <button class="gsbutton"></button> </div> <div class="main"> <div class="container"> <div class="row"> <div class="table-row"> <div class="mycolumn" id="sidebar"> <h1 class="promo_slogan"> Bring everyone together to build better products.</h1> <p></p> </div> <div class="mycolumn" id="content"><img src=""> </div> </div> </div> </div> </body> </html>
try this尝试这个
button[type="reset"]:focus, button[type="reset"]:active, button[type="reset"]:hover {
outline: none;
border: none;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.