导航:首页 > 万维百科 > 网页设计怎么添加按钮

网页设计怎么添加按钮

发布时间:2021-02-08 17:28:14

1、网页制作中加入图片按钮

如果是链接是a标签的话,可以在css里这样写:
a{背景图}
a:hover{背景图}
如果是button的话,可以这样写:
<input name="submit" class="button" class="button" onmouseover="this.className='button2'" onmouseout="this.className='button'" type="submit" id="submit" tabindex="5" value="发表评论" />
这是给buttom应用 css,给样式button应用一个样式 ,然后鼠标经过给button2应用 一个样式就可以了!这个是兼容所有浏览器的!

2、网页设计中怎么对按钮插入超链接

按钮不支持加超链接,但是有方法让你点击按钮后跳转网页
当前页面打开

<input type=button onclick="window.location.href('连接')">
新窗口打开
<input type=button onclick="window.open('连接')">
建议使用其他行内标签来做超链接 因为能用html实现,最好就不要用css,能用css实现的就不要用js

3、网页设计按钮

很简单啊!这里打的话,代码很长。首先你自己准备那几个图标。然后比如“学校信息管理”这个模块,其实就是个大的div包含着两个div,然后设置一下他们的背景css就好了。

比如:

<div id="nav" style="border:blue 1px solid"> <!--设置边框-->
<div style="backgroup-color:blue"><img src="一个简单图标">学校信息管理</div>

<div id="nv">
<ul>
<li>基本信息管理</li>
<li>添加信息</li>
<li>添加公告信息</li>

</ul>
</div>

</div>

然后在css中设置一下

#nv ul li{
display: inline;
}

OK了,其他的细节自己优化 呵呵

4、HTML设计问题-网页添加按钮

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎访问</title>
<style type="text/css">
body {
background-color:#000044;
background:url(images/bg.jpg) repeat-x;
margin:0;
padding:0;
text-align:center;
overflow:hidden;
}
a {
text-decoration:none;
color:#0078ff;
}
.option{
cursor:crosshair;
margin:10px auto;
padding:10px;
background-color:#fff;
font-family:微软雅黑;
font-size:36px;
width:330px;
}
a:hover{
font-size:33px;
}
</style>
</style>
</head>
<body onLoad="init()">
<script type="text/javascript" src="js/ThreeCanvas.js"></script>
<script type="text/javascript" src="js/Snow.js"></script>
<script type="text/javascript">
var SCREEN_WIDTH = window.innerWidth;
var SCREEN_HEIGHT = window.innerHeight;
var container;
var particle;
var camera;
var scene;
var renderer;
var mouseX = 0;
var mouseY = 0;
var windowHalfX = window.innerWidth / 2;
var windowHalfY = window.innerHeight / 2;
var particles = []; 
var particleImage = new Image();//THREE.ImageUtils.loadTexture( "img/ParticleSmoke.png" 
);
particleImage.src = 'images/ParticleSmoke.png'; 
function init() {
container = document.createElement('div');
document.body.appendChild(container);
camera = new THREE.PerspectiveCamera( 75, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 
10000 );
camera.position.z = 1000;
scene = new THREE.Scene();
scene.add(camera);
renderer = new THREE.CanvasRenderer();
renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
var material = new THREE.ParticleBasicMaterial( { map: new THREE.Texture
(particleImage) } );
for (var i = 0; i < 500; i++) {
particle = new Particle3D( material);
particle.position.x = Math.random() * 2000 - 1000;
particle.position.y = Math.random() * 2000 - 1000;
particle.position.z = Math.random() * 2000 - 1000;
particle.scale.x = particle.scale.y =  1;
scene.add( particle );
particles.push(particle); 
}
container.appendChild( renderer.domElement );
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'touchstart', onDocumentTouchStart, false );
document.addEventListener( 'touchmove', onDocumentTouchMove, false );
setInterval( loop, 1000 / 60 );
}
function onDocumentMouseMove( event ) {
mouseX = event.clientX - windowHalfX;
mouseY = event.clientY - windowHalfY;
}
function onDocumentTouchStart( event ) {
if ( event.touches.length == 1 ) {
event.preventDefault();
mouseX = event.touches[ 0 ].pageX - windowHalfX;
mouseY = event.touches[ 0 ].pageY - windowHalfY;
}
}
function onDocumentTouchMove( event ) {
if ( event.touches.length == 1 ) {
event.preventDefault();
mouseX = event.touches[ 0 ].pageX - windowHalfX;
mouseY = event.touches[ 0 ].pageY - windowHalfY;
}
}
//
function loop() {
for(var i = 0; i<particles.length; i++)
{
var particle = particles[i]; 
particle.updatePhysics(); 
with(particle.position)
{
if(y<-1000) y+=2000; 
if(x>1000) x-=2000; 
else if(x<-1000) x+=2000; 
if(z>1000) z-=2000; 
else if(z<-1000) z+=2000; 
}
}
camera.position.x += ( mouseX - camera.position.x ) * 0.05;
camera.position.y += ( - mouseY - camera.position.y ) * 0.05;
camera.lookAt(scene.position); 
renderer.render( scene, camera );
}
</script>
 
<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>

你自己背景做的不合适,不能怪我.

麻烦把你上一个匿名提问的采纳了,也是我回答的,谢谢.

5、设计网页点击添加按钮如何弹出对话框

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
<!--
td { font-size: 9pt}
a { color: #000000; text-decoration: none}
a:hover { text-decoration: underline}
.tx { font-size: 9pt; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; height: 20px; width: 40px; background-color: #eeeeee; cursor: hand}
.bt { font-size: 9pt; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; height: 16px; width: 60px; background-color: #eeeeee; cursor: hand}
.tx1 { height: 20px; width: 30px; font-size: 9pt; border: 1px solid; border-color: black black #000000; color: #0000FF}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>添加公告</title>
<style type="text/css">
<!--
.STYLE1 {font-size: 18px}
body {
background-color: #2286c2;
}
-->
</style>
</head>

<body>
<p class="STYLE1">公告标题:</p>
<form id="form1" name="form1" method="post" action="">
<label>
<input name="textfield" type="text" size="50" />
</label>
</form>
<p class="STYLE1">公告内容:</p>
<form id="form2" name="form2" method="post" action="">
<label>
<textarea name="textarea" cols="50" rows="20"></textarea>
</label>
<p>
<p><iframe frameborder="1" width="300" height="50" scrolling="no" src="upload.asp"></iframe></p>
</p>
</form>
<form id="form3" name="form3" method="post" action="">

<label> 
<input type="submit" name="Submit" value="提交" /> 
 
</label>
<input type="submit" name="Submit2" value="重置" />
</form>

<p> </p>
</body>
</html>

6、图片某个区域添加按钮怎么添加---网页设计

你只是想给文字加链接吗?你把图片作为div背景,然后在div里面加a标签,a标签里面写文字,同时给a标签加样式:text-indent:-1000px;

7、请问网页制作中按钮的制作

PS或coreldraw都可以,做成两种样式的,规格一样,大小一样,颜色变一下就可以,然后到dreamweaver中点编辑菜单有个插入-图像对象-鼠标经过图像就可插入鼠标经过以后的动态按钮。

8、网页设计:如何添加一个将本站设为主页的按钮???

DreamWaver有自来带的源程序
<script language="javascript">
function HP(){
this.homepage.style.behavior='url(#default#homepage)';this.homepage.sethomepage('你的网址');
}
</script>

<input type=button value="设为主页" onclick=HP() >

9、在网页制作软件中如何设置收藏按钮?

上百度知道最重要的就是回答问题,这个我可以回答到你,把以下代码 贴到你的网页回中。
function addFavorite(sURL, sTitle) {

try {

window.external.addFavorite(sURL, sTitle);

}

catch (e) {

try {

window.sidebar.addPanel(sTitle, sURL, "");

}

catch (e) {

alert("加入收藏失败,请答使用Ctrl+D进行添加");

}

}

}

与网页设计怎么添加按钮相关的知识