line-height是行高,height就是高,通常height是對(duì)于某個(gè)框架或者圖片來(lái)弄的,line-height用于文字
成都創(chuàng)新互聯(lián)公司堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿(mǎn)足客戶(hù)于互聯(lián)網(wǎng)時(shí)代的臨夏網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
如果要實(shí)際效果你可以寫(xiě)一段文字,分好幾行,然后對(duì)它做line-height屬性,就會(huì)注意到變化了
比如:
div style="line-height:20px;"abcbr/abcbr/abcbr/abcbr/abcbr//div
調(diào)整20px這個(gè)值,行間距就會(huì)發(fā)生變化
diva href="#" style="float:left; text-align:left; margin-left:10px;"文字列表內(nèi)容/aspan style="clear:both;float:right; margin-right:20px;"時(shí)間/span/div
至于時(shí)間不顯示年,要改js代碼,一般是把年份隱藏,有是系統(tǒng)時(shí)間,要代碼控制的。
html
head
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
meta name="keywords" content="js特效" /
meta name="description" content="js特效網(wǎng)" /
title年月日分秒全部顯示的時(shí)間代碼/title
/head
body onload=startclock()
form name="clock"
script language="JavaScript"
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;}
function startclock () {
stopclock();
showtime();}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = now.getYear()+"年"+(now.getMonth()+1)+"月"+now.getDate()+"日" +((hours = 12) ? " 下午 " : " 上午 " )
timeValue += ((hours 12) ? hours -12 :hours)
timeValue += ((minutes 10) ? ":0" : ":") + minutes
timeValue += ((seconds 10) ? ":0" : ":") + seconds
document.clock.thetime.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;}
/script
input name="thetime" style="font-size: 9pt;color:#000000;border:1px solid #FFFFFF; ; " size="28"/form
/body
/html