Is there a simple way to add 开发者_StackOverflow中文版
align="left"
into img tag for every inserted image?
thanks
Use CSS?
img { float: left; }
When you say "every inserted image", are you dynamically adding images into the page with jQuery?
If the answer is "yes" (dynamic images), for every image add a CSS class to the image:
<img src="img/path.png" class="insertedImage" />
And then define a CSS class in your CSS file:
img.insertedImage { float: left; }
If the answer is "no", then just add CSS that left-aligns every image on the page:
img { float: left; }
精彩评论