本文介绍了如何将文本,图像等对齐到左侧或中央的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始学习HTML,我想如何对齐这样的文字:



这是左对齐左边这是对齐的





这是在中心对齐











问候,

Ahsan Naveed

I am just beginning to learn html and i want to how do we align text like this:

this is aligned left this is aligned right


this is aligned in the center





Regards,
Ahsan Naveed

推荐答案

<style type="text/css">

.TblLeft
{
    align:left;
    text-align: left;

}
.TblRight
{
    align:Right;
    text-align: right;
}
.TblCenter
{
    align:center;
 text-align: center;
}
</style>
</head>

<body>
<div class="TblLeft"> This is aligned to Left </div>
<div class="TblRight">  This is aligned to Right </div>
<div class="TblCenter"> This is aligned to Center </div>
</body>



希望它有所帮助



问候,Mahe


Hope it helps

Regards,Mahe


这篇关于如何将文本,图像等对齐到左侧或中央的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 00:58