运营策略:html语言中如何实现图片居中

来源:百度文库 编辑:高校问答 时间:2024/04/29 04:46:53
请问如何实现图片居中
原始代码如下,应该加入什么代码?
谢谢!

<script>
// the name of your first picture-file
var picture1=" http://网址"
// the name of your second picture-file
var picture2="网址"
// the name of your second picture-file
var picture3="044.gif"
// the width and height of your pictures (pixels)
var picturewidth=386
var pictureheight=580
</script>
<script>
if (document.all) {
document.write('<OBJECT ID="DAControl_Wipe" ')
document.write('STYLE="width:'+picturewidth+';height:'+pictureheight+'"')
document.write('CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">')
document.write('</OBJECT>')
m = DAControl_Wipe.MeterLibrary;
whatTransformation = new ActiveXObject("DXImageTransform.Microsoft.Wipe");
whatPictures = new Array();
whatPictures[0] = m.ImportImage(picture1);
whatPictures[1] = m.ImportImage(picture2);
forward = m.Interpolate(0, 1, 3);
back = m.Interpolate(1, 0, 2);
whatMovement = m.Sequence(forward, back).RepeatForever();
whatTransformation.GradientSize = 1.0;
whatTransformation.WipeStyle = 0;
theResult = m.ApplyDXTransform( whatTransformation, whatPictures,
whatMovement );
DAControl_Wipe.Image = theResult.OutputBvr;
DAControl_Wipe.Start();
}</script>
谢谢

<p align="center"> 内容 </p>