CSS怎样设置图片对齐方式

html-css093

CSS怎样设置图片对齐方式,第1张

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

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />

<title>无标题文档</title>

<style type="text/css">

</style>

</head>

<body>

<div style="text-align:centerwidth:500px">

图片总要放到一个层里吧...宽度随意的.加上居中代码即可.

<img src="file:///E|/web/baidu_logo.gif" width="270" height="129" />

</div>

</body>

</html>

<img src = '../image/1.jpg'><br>

<img src = '../image/2.jpg'><br>

<img src = '../image/3.jpg'><br>

<img src = '../image/4.jpg'><br>

最基本的对齐方式:

img{

width:100px

height:100px

}