導航:首頁 > 萬維百科 > 網頁設計之html課件

網頁設計之html課件

發布時間:2020-12-15 23:55:11

1、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>
<title>3</title>
<script>
function r()
{

var username=document.getElementById("username");

var pass=document.getElementById("password");
if(username.value=="")
{
alert("請輸入用戶名");
username.focus();
return;
}
if(pass.value=="")
{
alert("請輸入密碼");
return;
}
return true;
}
</script>
</head>
<body>
<form>
<table width="350" bgcolor="#ccffcc" style="border-color" border="1">
<tr align=center>
<td>用戶名</td><td><input type="text" name="username" id="username"></td>
</tr>
<tr align=center><td>密 碼</td><td><input type="password" name="password" id="password"></td></tr>
<tr align=center><td>驗證碼</td><td><input type="text" name="yanzheng"></td></tr>
<tr align=center><td colspan="2"><input type="button" value="登 錄" onclick="r();"/>     <input type="reset" value="重 置"/></td></tr>

</table>
</form>
</body>
</html>

2、使用html5+css3來設計頁面和使用powerpoint製作ppt的區別是什麼

一個是使用編程的方式來做頁面(html5,css3)
另一個是通過手動選擇模塊,自己只需要滑鼠點點,寫寫文字,貼貼圖片

3、網頁設計Html5

左邊的左浮動,右邊的右浮動,沒有問題的。

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
#div0 {
    width: 800px;
}
#divL {
    width: 598px;
    height: 300px;
    float: left;
    background-color: #ddd;
}
#divR {
    width: 200px;
    height: 300px;
    background-color: #eee;
    float: right;
}
#l1 {
    height: 50px;
    background-color: #888;
}
#l2 {
    height: 100px;
    background-color: #aaa;
}
</style>
</head>
<body>
<div id='div0'>
  <div id='divL'>
    <div id='l1'>左浮動內容1</div>
    <div id='l2'>左浮動內容2</div>
  </div>
  <div id='divR'>右浮動內容</div>
</div>
</body>
</html>

顯示結果:

與網頁設計之html課件相關的知識