1. 怎么用html代码写按钮改变项目属性
<head>
<meta ; charset=gb2312" />
<title>;用css写按钮改变项目属性</title>
<style type="text/css">
<!--
.btn{margin: 0px; width:100px; height:30px; overflow:hidden; border:1px solid #999; color:#fff; background:#000}
-->
</style>
</head>
<body>
<input name="" type="button" value="按钮" class="btn" />
</body>
在input里调用btn这个自定义css,width:长度,height:高度,border:边框,color:按键文字颜色,background:背景颜色。
2. html js button 按钮怎么写事件代码
<!DOCTYPE html>
<html lang="en" charset='utf-8'>
<style>
.d3 form {
background: #E5E5E5;
position: relative;
margin: 0 auto;
}
.d3 input, .d3 button {
border: none;
outline: none;
background: transparent;
}
.d3 input {
width: 100%;
height:35px;
padding-left: 15px;
font-size:13px;
font-family:微软雅黑;
}
.d3 button {
height: 35px;
width: 35px;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
.d3 button:before {
font-size: 13px;
}
</style>
<div class="d3">
<form>
<input type="text" id='serchbox' placeholder="发帖求助前要善用【搜索】功能,这里可能会有你要找的答案。">
<button id="search-btn" onclick="serch();" type="submit"/><img src="so.png" height="19" width="18" alt="搜索" /></button>
</form>
</div>
<script>
function serch(){
var value = document.getElementById('serchbox').value;
window.open('a/'+value);
}
</script>
</body>
</html>
3. HTML 如何实现自定义按钮
给按钮写样式就行啊。以下代码仅供参考。
<input type="button" value="这是一个按钮" class="btn">
<style type="text/css">
.btn{width:120px;padding:0;cursor:pointer;display:inline-block;text-align:center;border:1px solid transparent;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;height:30px;line-height:30px;font-family:"Microsoft Yahei";font-size:15px;padding:0 15px;border-color:#45ad00;background:#45ad00;color:#fff;}
</style>
4. 帮忙写个HTML网页按钮代码
<!doctype html>
<meta charset="utf-8"/>
<html>
<head>
<style type="text/css">
html,body{
height:100%;
margin:0;
background: #EEEEEE;
position:relative;
}
button {
position: absolute;
top:50%;
left:50%;
width: 400px;
height: 100px;
margin:-50px -200px;
background: #ffffff;
font:72px "Microsoft YaHei";
color:blue;
}
button:hover{
background:#eeeeff;
}
</style>
</head>
<body>
<button onclick="location.href='#someplace'">;进入BBS</button>
</body>
</html>
代码如上,兼容直到IE6
5. 帮忙写个HTML网页按钮代码
<!DOCTYPE html>
<html>
<head>
<meta ; charset=utf-8" />
<title>;首页</title>
<style type="text/css">
body{
background-color:#ccc;
margin:0;
padding:0;
text-align:center;
}
.option{
cursor:crosshair;
margin:10px auto;
padding:10px;
background-color:#fff;
font-family:微软雅黑;
font-size:36px;
width:330px;
}
a{
color:black;
text-decoration:none;
}
a:hover{
font-size:33px;
}
</style>
</head>
<body>
<div class="option" style="margin-top:230px;"><a href="./luntan/index.html">;进
入校园BBS</a></div>
<div class="option"><a href="./bbs/index.html">;进入兴趣小组BBS</a></div>
</body>
</html>;我只学了css,不会把框架上下绝对居中.中间的并不是按钮,而是一个超链接,背景图你也没给,我尽力了,谢谢