1. 怎麼樣用html語言讓圖片的位置向左或者是向右移動一點
根據圖片的位置需要向左或者是向右移動多少來調整代碼中left和top的值即可,說明:
Left靠左距離多少
Top靠頂部距離多少
通過下面方法:
<imgsrc="ad-02.jpg"width="400px";height="200px";style="position:absolute;left:100px;top:100px;">
2. html網頁製作中,把圖片放在左下方怎麼做
用嵌套的div來相對定位:
<div id="beijing" style="background-image:url(image/bg/nav_blue.gif); width:400px; height:200px;"><div style="margin-left:100px; margin-top:50px; border:#F00 solid 1px; width:80px; height:40px;"></div></div>
上面是個例子
下面的代碼解釋 :
margin-left:100px;就是距離背景層左邊的距離為100像素,
margin-top:50px; 就是距離背景層上邊的距離為50像素;
如果你想把圖放到左下方的地方,
就用margin-left:100px;
右邊的話就用margin-right:100px;
代碼第一行打括弧的地方就是放圖片鏈接的
自己拿去再稍加琢磨,應該很快就可以搞定了!
htm代碼其實很容易懂的!
祝你成功吧
3. 用代碼編輯網頁的時候,用什麼代碼可以讓文本靠左或靠右
如果是在表格里的文本,在td裡面加上 align="left"就是靠左,align="right"就是靠右。
4. ASP網頁,怎麼把一段代碼顯示出來的圖片放到左邊
<%
while not rs.eof
%>
<table>
<tr>
<td>
<img src="<%=rs("pic_src")%>" width=50 height=50>
</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
</table>
<%
rs.movenext
wend
%>
width=50 height=50 可以根據你的實際要求設定
5. asp網頁代碼怎麼編寫圖片一直在左邊
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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></head>中
<SCRIPT language="javascript" defer>
self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX=0;lastScrollY=0;NS=(document.layers)?1:0;IE=(document.all)?1:0;
function move1(){
if(IE){
diffY=document.documentElement.scrollTop;
diffX=0;
}
if(NS){
diffY=self.pageYOffset;
diffX=self.pageXOffset;
}
if(diffY!=lastScrollY)
{
percent =.1*(diffY-lastScrollY);
if(percent>0)
percent=Math.ceil(percent);
else percent=Math.floor(percent);
if(IE)document.all.a1.style.pixelTop+=percent;
if(NS)document.a1.top+=percent;
lastScrollY=lastScrollY+percent;
}
if(diffX!=lastScrollX)
{
percent=.1*(diffX-lastScrollX);
if(percent>0)
percent=Math.ceil(percent);
else percent = Math.floor(percent);
if(IE)document.all.a1.style.pixelLeft+=percent;
if(NS)document.a1.left+=percent;
lastScrollX=lastScrollX+percent;
}
}
if(NS||IE) action =window.setInterval("move1()",1);
</SCRIPT>
然後在<body></body>中
<div id="a1" style="left:1px; position: absolute; top: 198px; z-index:0px; width: 108px; height: 60px;">
這個就是你創建的窗口
裡面可以用TABLE做個表格
我這個是漂浮在左邊的,要漂在別的地方修改下位置就好
6. 讓網頁圖片居左對齊的html 代碼怎麼寫
1、首先打開hbuilder軟體,新建啊一個html文件並在裡面創建一個div容器,容器設置class屬性名為container,div內設置一個圖片。
7. 大家好,我的網頁為什麼背景圖靠左,怎麼居中
第一步:拷貝下列代碼到你的html文件的<head>和</head>之間:
<style>
<!--
BODY
{
background-position:center
right;
background-repeat:no-repeat;
}
-->
</style>
第二步:修改你的BODY語句為(背景圖片的路徑):
<body
background="
images/logo2.gif">
說明:
background-position:設置背景的位置,有兩個參數,第一個用於定位前景的上下位置,可以是top(靠上)、center(中間)和bottom(底部),第二個用於定位前景的左右位置,可以是left(左)、center(中間)和right(右邊),參數也可以是具體的值,如background-position:100px
200px。
background-repeat:設置背景的表現方式,有repeat、no-repeat、repeat-x和repeat-y四種,repeat就是背景可以在x和y兩個方向上重復平鋪顯示,no-repeat則是只顯示一個背景,repeat-x和repeat-y分別是在x和y方向上重復平鋪顯示。
8. 做網頁時如何加入代碼使圖片從右向左滾動呢
往左是:
<marquee><img src="你的圖片地址"></marquee>
往右是:
<marquee direction=right><img src="你的圖片地址"></marquee>
往上是:
<marquee direction=up><img src="你的圖片地址"></marquee>
往下是:
<marquee direction=down><img src="你的圖片地址"></marquee>
如果需要在當滑鼠移動到圖片上時停止滾動,就在<marquee>里加onmouseover=stop() onmouseout=start(),
例如<marquee direction=down onmouseover=stop() onmouseout=start()><img src="你的圖片地址"></marquee>
9. html,img圖片怎麼居左
img標簽是行內塊元素,具有行內元素的特性也有塊元素的特性。
行內元素默認就是靠左的,除非父級元素有過其他的設置。
如果想讓img靠左顯示就給img父元素加上text-align: left這樣的樣式。