⑴ 小白求一句可以缩放整体网页代码,类似于浏览器的缩放

可以使用css3的scale缩放来实现

body{
transform: scale(0.5);
transform-origin: center top 0px;
}

html实现网页上图片放大功能代码 就像新浪微博图片放大一样的那种,点一下放大再点一下就变成原来的状态。

<head>
<bgsound src="路径" loop="-1">/* ===== 背景音乐 ==== */
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>图片欣赏</title>
<style type="text/css">
html {
: hidden;
}

body {
margin: 0px;
padding: 0px;
background: #000;
position: absolute;
width: 100%;
height: 100%;
cursor: crosshair;
}

#diapoContainer {
position: absolute;
left: 10%;
top: 10%;
width: 80%;
height: 80%;
background: #222;
overflow: hidden;
}

.imgDC {
position: absolute;
cursor: pointer;
border: #000 solid 2px;
filter: alpha(opacity=90);
opacity: 0.9;
visibility: hidden;
}

.spaDC {
position: absolute;
filter: alpha(opacity=20);
opacity: 0.2;
background: #000;
visibility: hidden;
}

.imgsrc {
position: absolute;
width: 120px;
height: 67px;
visibility: hidden;
margin: 4%;
}

#bkgcaption {
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
height: 6%;
background:#1a1a1a;
}
#caption {
position: absolute;
font-family: arial, helvetica, verdana, sans-serif;
white-space: nowrap;
color: #fff;
bottom: 0px;
width: 100%;
left: -10000px;
text-align: center;
}

</style>
<script type="text/javascript">
var xm;
var ym;

/* ==== onmousemove event ==== */
document.onmousemove = function(e){
if(window.event) e=window.event;
xm = (e.x || e.clientX);
ym = (e.y || e.clientY);
}

/* ==== window resize ==== */
function resize() {
if(diapo)diapo.resize();
}
onresize = resize;

/* ==== opacity ==== */
setOpacity = function(o, alpha){
if(o.filters)o.filters.alpha.opacity = alpha * 100; else o.style.opacity = alpha;
}

////////////////////////////////////////////////////////////////////////////////////////////
/* ===== encapsulate script ==== */
diapo = {
O : [],
DC : 0,
img : 0,
txt : 0,
N : 0,
xm : 0,
ym : 0,
nx : 0,
ny : 0,
nw : 0,
nh : 0,
rs : 0,
rsB : 0,
zo : 0,
tx_pos : 0,
tx_var : 0,
tx_target : 0,

/////// script parameters ////////
attraction : 2,
acceleration : .9,
dampening : .1,
zoomOver : 2,
zoomClick : 6,
transparency : .8,
font_size: 18,
//////////////////////////////////

/* ==== diapo resize ==== */
resize : function(){
with(this){
nx = DC.offsetLeft;
ny = DC.offsetTop;
nw = DC.offsetWidth;
nh = DC.offsetHeight;
txt.style.fontSize = Math.round(nh / font_size) + "px";
if(Math.abs(rs-rsB)<100) for(var i=0; i<N; i++) O[i].resize();
rsB = rs;
}
},

/* ==== create diapo ==== */
CDiapo : function(o){
/* ==== init variables ==== */
this.o = o;
this.x_pos = this.y_pos = 0;
this.x_origin = this.y_origin = 0;
this.x_var = this.y_var = 0;
this.x_target = this.y_target = 0;
this.w_pos = this.h_pos = 0;
this.w_origin = this.h_origin = 0;
this.w_var = this.h_var = 0;
this.w_target = this.h_target = 0;
this.over = false;
this.click = false;

/* ==== create shadow ==== */
this.spa = document.createElement("span");
this.spa.className = "spaDC";
diapo.DC.appendChild(this.spa);

/* ==== create thumbnail image ==== */
this.img = document.createElement("img");
this.img.className = "imgDC";
this.img.src = o.src;
this.img.O = this;
diapo.DC.appendChild(this.img);
setOpacity(this.img, diapo.transparency);

/* ==== mouse events ==== */
this.img.onselectstart = new Function("return false;");
this.img.ondrag = new Function("return false;");
this.img.onmouseover = function(){
diapo.tx_target=0;
diapo.txt.innerHTML=this.O.o.alt;
this.O.over=true;
setOpacity(this,this.O.click?diapo.transparency:1);
}
this.img.onmouseout = function(){
diapo.tx_target=-diapo.nw;
this.O.over=false;
setOpacity(this,diapo.transparency);
}
this.img.onclick = function() {
if(!this.O.click){
if(diapo.zo && diapo.zo != this) diapo.zo.onclick();
this.O.click = true;
this.O.x_origin = (diapo.nw - (this.O.w_origin * diapo.zoomClick)) / 2;
this.O.y_origin = (diapo.nh - (this.O.h_origin * diapo.zoomClick)) / 2;
diapo.zo = this;
setOpacity(this,diapo.transparency);
} else {
this.O.click = false;
this.O.over = false;
this.O.resize();
diapo.zo = 0;
}
}

/* ==== rearrange thumbnails based on "imgsrc" images position ==== */
this.resize = function (){
with (this) {
x_origin = o.offsetLeft;
y_origin = o.offsetTop;
w_origin = o.offsetWidth;
h_origin = o.offsetHeight;
}
}

/* ==== animation function ==== */
this.position = function (){
with (this) {
/* ==== set target position ==== */
w_target = w_origin;
h_target = h_origin;
if(over){
/* ==== mouse over ==== */
w_target = w_origin * diapo.zoomOver;
h_target = h_origin * diapo.zoomOver;
x_target = diapo.xm - w_pos / 2 - (diapo.xm - (x_origin + w_pos / 2)) / (diapo.attraction*(click?10:1));
y_target = diapo.ym - h_pos / 2 - (diapo.ym - (y_origin + h_pos / 2)) / (diapo.attraction*(click?10:1));
} else {
/* ==== mouse out ==== */
x_target = x_origin;
y_target = y_origin;
}
if(click){
/* ==== clicked ==== */
w_target = w_origin * diapo.zoomClick;
h_target = h_origin * diapo.zoomClick;
}

/* ==== magic spring equations ==== */
x_pos += x_var = x_var * diapo.acceleration + (x_target - x_pos) * diapo.dampening;
y_pos += y_var = y_var * diapo.acceleration + (y_target - y_pos) * diapo.dampening;
w_pos += w_var = w_var * (diapo.acceleration * .5) + (w_target - w_pos) * (diapo.dampening * .5);
h_pos += h_var = h_var * (diapo.acceleration * .5) + (h_target - h_pos) * (diapo.dampening * .5);
diapo.rs += (Math.abs(x_var) + Math.abs(y_var));

/* ==== html animation ==== */
with(img.style){
left = Math.round(x_pos) + "px";
top = Math.round(y_pos) + "px";
width = Math.round(Math.max(0, w_pos)) + "px";
height = Math.round(Math.max(0, h_pos)) + "px";
zIndex = Math.round(w_pos);
}
with(spa.style){
left = Math.round(x_pos + w_pos * .1) + "px";
top = Math.round(y_pos + h_pos * .1) + "px";
width = Math.round(Math.max(0, w_pos * 1.1)) + "px";
height = Math.round(Math.max(0, h_pos * 1.1)) + "px";
zIndex = Math.round(w_pos);
}
}
}
},

/* ==== main loop ==== */
run : function(){
diapo.xm = xm - diapo.nx;
diapo.ym = ym - diapo.ny;
/* ==== caption anim ==== */
diapo.tx_pos += diapo.tx_var = diapo.tx_var * .9 + (diapo.tx_target - diapo.tx_pos) * .02;
diapo.txt.style.left = Math.round(diapo.tx_pos) + "px";
/* ==== images anim ==== */
for(var i in diapo.O) diapo.O[i].position();
/* ==== loop ==== */
setTimeout("diapo.run();", 16);
},

/* ==== load images ==== */
images_load : function(){
// ===== loop until all images are loaded =====
var M = 0;
for(var i=0; i<diapo.N; i++) {
if(diapo.img[i].complete) {
diapo.img[i].style.position = "relative";
diapo.O[i].img.style.visibility = "visible";
diapo.O[i].spa.style.visibility = "visible";
M++;
}
resize();
}
if(M<diapo.N) setTimeout("diapo.images_load();", 128);
},

/* ==== init script ==== */
init : function() {
diapo.DC = document.getElementById("diapoContainer");
diapo.img = diapo.DC.getElementsByTagName("img");
diapo.txt = document.getElementById("caption");
diapo.N = diapo.img.length;
for(i=0; i<15; i++) diapo.O.push(new diapo.CDiapo(diapo.img[i]));
diapo.resize();
diapo.tx_pos = -diapo.nw;
diapo.tx_target = -diapo.nw;
diapo.images_load();
diapo.run();
}
}

</script>
</head>

<body>

<div id="diapoContainer">
<img class="imgsrc" src="图片的路径(相对路径或绝对路径)" alt="图片的注释(第一张)">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<div id="bkgcaption">
</div>
<div id="caption">
</div>
</div>
<script type="text/javascript">
/* ==== start script ==== */
function dom_onload() {
if(document.getElementById("diapoContainer")) diapo.init(); else setTimeout("dom_onload();", 128);
}
dom_onload();

</script>

</body>

</html>

⑶ 怎么样把HTML代码里面的字体放大 放大的代码是什么

<html>

<head><title>字体大小 font size</title></head><body>

<p><font size="1">这段文字的字体大小值为1。</font></p>

<p><font size="2">这段文字的字体大小值为2。</font></p>

<p><font size="3">这段文字的字体大小值为3。</font></p>

<p><font size="4">这段文字的字体大小值为4。</font></p>

<p><font size="5">这段文字的字体大小值为5。</font></p>

<p><font size="6">这段文字的字体大小值为6。</font></p>

<p><font size="7">这段文字的字体大小值为7。</font></p></body>

</html> 数字代表大小...越大的数字代表字体更大.

(3)网页放大代码扩展阅读

html5 和html的区别:

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">

html5:<!doctype html>

在文档声明上,html有很长的一段代码,并且很难记住这段代码,而html5却不同,只有简简单单的声明,这也方便人们的记忆。

2.在结构语义上

html:没有体现结构语义化的标签,通常都是这样来命名的<div id="header"></div>,这样表示网站的头部。

html5:在语义上却有很大的优势。提供了一些新的标签,比如:<header><article><footer>。

⑷ 设置 网页 页面大小的代码是什么

作个宽230高678的表格不就行了?
你要设置弹出窗口大小么?
SCRIPT LANGUAGE="javascript">
<!--
window.open ('page.html', 'newwindow', 'height=678, width=230, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, sizable=no,location=no, status=no')
//写成一行
-->
</SCRIPT>

⑸ 网页代码-放大镜功能

你看你的代码,把代码中的图片目录替换成放大代码中的图片地址就可以了
不行的话邮件告诉我

⑹ 求能自动缩放网页大小的代码

取屏幕大小
screen.width
screen.height
根据屏幕大小缩放
if (window.screen.width=='600')
document.write ('<body style="zoom: 55%">');
else if (window.screen.width=='800')
document.write ('<body style="zoom: 75%">');

⑺ 控制一个网页窗口的大小的代码

直接这样写就行了:
<script language='javascript'>
window.open('4.html','','toolbar=no,menubar=no,location=no,status=no,width=500,height=500,left=100,top=100');
</script>

⑻ 如何实现HTML整体进行缩放 用css或javascript代码都可以

你可以使用CSS zoom属性
例如:
body {
zoom: 3;
-moz-transform: scale(3);
-moz-transform-origin: 0 0;

}
把整个body放大三倍,缩小同理,改成比1小的数字即可

⑼ 怎样用代码来缩放网页啊....

Ctrl加鼠标滚轮就可以缩放
代码的话,你可以用css,然后用js响应时间进行style属性替换

⑽ html文字大小代码

一般标签内都有style属性,在style属性里面通过font-size就可以定义的<font style="font-size:12px">文字</font>
<span style="font-size:12px">文字</span>
另外版
<font size="30">文字</font>
<h1>文字</h1>
<h2>文字</h2>
<h3>文字</h3>
.....
还有好多权就不列举了。