html设计网页实例代码(用html语言怎样制作网页请举列说明)

本文目录
用html语言怎样制作网页请举列说明
《html》
《body》
《p》
An image:
《img src="./images/constr.gif" width="144" height="50"》
《/p》
《p》
A moving image:
《img src="./images/hackanm.gif" width="48" height="48"》
《/p》
《p》
Note that the syntax of inserting a moving image is no different from that of a non-moving image.
《/p》
《/body》
《/html》
做html网页时,公共部分的代码,求样例
是这样吗
body,div,dl,dd,dt,ul,li,h1,h3,h3,h4,h5,h6,input,form,a,p,textarea{
margin:0px;
padding:0px;
}
ol,ul,li{
list-style:none;
}
a{
text-decoration: none;
display: block;
color:#fff;
}
img{
border:none;
display: block;
}
.clearfloat{
zoom:1;
}
.clearfloat:after{
display: block;
clear:both;
content:"";
visibility:hidden;
height:0;
}
还是这个
.public-container{
/*position:relative;如果子元素没有绝对定位的,其实是不需要写这个的*/
position:relative;
width:1100px;
margin:0 auto;
}
.public-header .header-logo{
float:left;
background-image: url("../images/logo.png");
margin-top:40px;
}
.public-header .header-logo a{
width:182px;
height:54px;
}
.public-header .header-nav{
float:right;
margin-top:44px;
}
.public-header .header-nav .item{
float:left;
margin-left:50px;
/*color: #3b3b3b; 这里写是没用的*/
}
.public-header .header-nav a {
color: #3b3b3b;
}
.public-header .header-nav a:hover{
text-decoration: underline;
}
.public-footer{
height:218px;
background-color: #3b3b3b;
padding-top:100px;
}
.public-footer .footer-col{
width:230px;
float:left;
margin-right:60px;
font-size:16px;
color:#fff;
lineheight:1.8;
}
.public-footer .footer-col:last-child{
margin-right:0px;
}
.public-footer .footer-logo{
width:182px;
height:54px;
margin-top:-10px;
margin-bottom:10px;
background-image: url("../images/logo-white.png");
}
javascript html实现网页版日历代码
本文实例为大家分享了网页版日历代码,供大家参考,具体内容如下
效果图:
实现代码:
《html》
《head》
《link
rel="stylesheet"
type="text/css"
href="Skin.css"》
《style》
《!--
table{
text-align:
center
}
--》
《/style》
《/head》
《body》
《div
align="center"》
《script
language="javascript"》
var
my
=
new
Date();
function
showc()
{
var
k=1;
var
j=1;
var
today;
var
tomonth;
var
theday=1;//日期
var
max;
var
temp;
var
tempday;//这个月第一天的星期
document.write
("《b》"
+
my.getFullYear()
+
"-"
+
(my.getMonth()+1)
+
"《/b》");
document.write
("《table
border=’1’
width=’273’
height=’158’》");
document.write
("《tr》");
document.write
("《td
height=’23’
width=’39’》《font
color=’red’》Sun《/font》《/td》");
document.write
("《td
height=’23’
width=’39’》Mon《/td》");
document.write
("《td
height=’23’
width=’39’》Tue《/td》");
document.write
("《td
height=’23’
width=’39’》Wed《/td》");
document.write
("《td
height=’23’
width=’39’》Thu《/td》");
document.write
("《td
height=’23’
width=’39’》Fri《/td》");
document.write
("《td
height=’23’
width=’39’》Sat《/td》");
document.write
("《/tr》");
temp=my.getDate();
my.setDate(1);
//document.write
(my.getDate());
tempday=my.getDay();//返回第一天是星期几
my.setDate(temp);
today=my.getDay();//返回现在星期几
switch
((my.getMonth()+1))
{
case
1:
case
3:
case
5:
case
7:
case
8:
case
10:
case
12:
max=31;
break;
case
4:
case
6:
case
9:
case
11:
max=30;
break;
default:
max=29;//这里没有考虑闰月!!
//document.write
(max);
}
for(k=0;k《6;k++)
{
document.write
("《tr》");
for(j=0;j《=6;j++)
{
document.write
("《td
height=’23’
width=’39’》");
if(j》=(tempday))
{
tempday=0;//设置为最小,相当于取消判断条件
if(theday《=max)
{
document.write
("《a
title="
+
my.getFullYear()
+
"-"
+
(my.getMonth()+1)
+
"-"
+theday
+
"
target=’_blank’
href=detail.asp?date="
+
theday
+
"》");
if(theday==my.getDate())
document.write
("《font
color=’green’》["
+
theday
+
"]《/font》《/a》");
else
if(j==0)
document.write
("《font
color=’red’》"
+
theday
+
"《/font》《/a》");
else
document.write
(theday
+
"《/a》");
theday++;
}
}
document.write
("《/td》");
}
document.write
("《/tr》");
}
document.write
("《/table》");
}
showc();
《/script》
《/div》
《body》
《/html》
以上就是本文的全部内容,希望大家可以轻松实现网页版日历。

本文相关文章:
手机网站开发公司(沈阳APP开发公司哪家比较专业(沈阳app制作公司))
2026年5月16日 02:13
怎么做企业组织结构图(组织架构图怎么做 如何制作组织架构图)
2026年5月15日 23:59
深圳企业网站制作公司怎样(深圳盛强网络制作网站建设,服务好吗)
2026年5月15日 19:22
word封面怎么制作 word封面如何制作?ps怎么制作封面如何用ps制作封面
2026年5月15日 14:11
更多文章:
有哪些好的软文营销案例_软文营销经典案例?微商软文标题怎么写才吸引人
2026年4月22日 18:07
鹤壁seo学习基础入门教程:新手如何从零开始学习鹤壁seo学习
2026年6月15日 01:27
黑龙江网站制作公司(黑龙江省天地传奇文化传播有限公司怎么样)
2026年5月2日 03:08
开发平台技术创新联盟(确定国家自然科学基金资助项目应当坚持什么的原则)
2026年5月15日 03:38

















