开发者

CLEditor image align

开发者 https://www.devze.com 2023-03-18 13:19 出处:网络
Is there a simple way to add 开发者_StackOverflow中文版 align=\"left\" into img tag for every inserted image?

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; }

0

精彩评论

暂无评论...
验证码 换一张
取 消