導航:首頁 > 萬維百科 > 網頁設計怎麼添加按鈕

網頁設計怎麼添加按鈕

發布時間: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進行添加");

}

}

}

與網頁設計怎麼添加按鈕相關的知識