谁能帮帮我。我真的需要为我创建的 img 按钮创建一个按钮效果。是否有 css 解决方案,我是否需要创建其他按钮?我希望任何人都可以帮助我,因为我真的需要一个效果。
<html><head>
<title>Mobiel</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- Bootstrap -->
<link href="css\bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="css\styles_responsive.css" type="text/css" media="screen" title="no title" charset="utf-8">
<style>
body {
padding: 50px
}
</style><!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --><!-- WARNING: Respond.js doesn't work if you view the page via file:// --><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script>
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@-ms-viewport{width:auto!important}"
)
);
document.getElementsByTagName("head")[0].
appendChild(msViewportStyle);
}
</script>
<style>
.navbar {
position: left;
overflow: visible;
padding-top: 0;
}
</style>
<style type="text/css">
li{list-style-type:none;float:left;}
a{text-align:center}
</style>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<img src="img\Logo_helpen.jpg" alt="Logo"></div></div></div>
<p>
</p><p>
</p><p>
<br>
<a href="#"><img src="img\hoe-werkt-het.png" alt="Hoe werkt het?" name="Hoe werkt het?" class="img-rounded"> </a>
<a href="search\index.html"><img src="img\smoelenboek.png" alt="image with rounded corners" class="img-rounded">
<a href="alert\alert.html"><img src="img\aagje-alert.png" alt="image with rounded corners" class="img-rounded"></a></p><p>
<small>Hoe werkt Smoelenboek Aagje Alert <br> het? </small><br>
<img src="img\alert.jpg" alt="image with rounded corners" class="img-rounded">
<img src="img\alert.jpg" alt="image with rounded corners" class="img-rounded">
<img src="img\alert.jpg" alt="image with rounded corners" class="img-rounded"></a></p>
<br><a href="#">
<img src="img\alert.jpg" alt="image with rounded corners" class="img-rounded">
<img src="img\alert.jpg" alt="image with rounded corners" class="img-rounded">
<img src="img\alert.jpg" alt="image with rounded corners" class="img-rounded"></a><p><a href="#">
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js\bootstrap.min.js"></script>
</a></p></body></html>
最佳答案
要在悬停时更改元素的 CSS 属性,请在 CSS 中使用 :hover
。
a .img-rounded:hover {
/* CSS here */
}
关于jquery - 如何为按钮添加悬停效果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24331300/