我在电源自动化中使用 HTML,并且正在使用填充左函数来尝试将标签向右移动。
但是它不起作用。下面是代码。
<html>
<style>
.email-container2{
border: 3px solid gray;
}
span.name { color:blue
}
.bottom-border{
border-bottom: 30px solid blue;
}
.bottom-border1{
border-bottom: 3px solid gray;
}
.underline{
text-decoration-line: underline;
text-decoration-color: blue;
}
.email-container1 {
border: 3px solid gray;
}
.right{
margin-left: 80%;
text-align: right;
}
p.x1 {
padding-left:10%;
}
p.x2 {
}
p.x3 {
;
}
p.x4 {
text-align: right;
}
p.x5{
}
.img-container {
text-align: left;
height="20";
width="20";
}
.img-container1 {
text-align: right;
width="100";
}
</style>
<head>
</head>
<body >
<div class = "email-container" >
<div class = "bottom-border">
<div class = "bottom-border1">
<div class ="content">
<div class="row" style="width:100%">
<div class= "img-container" style="width:50%">
<img src= https://careers.electronicsforu.com/wp-content/uploads/2016/11/tata-steel-logo.jpg alt="Airplane" >
</div>
<div class="img-container1" style="width:50%">
<img src= https://privatecdn.sharepointonline.com/tslin.sharepoint.com/sites/BoardingPass-Aviation/SiteAssets/SitePages/BoardingPass-Aviation/82731TataSteel_Aviation.jpg >
</div>
</div>
<br />
<div>
<div class = "email-container1" style="background-color:powderblue;">
<h4 align="center">
TATA STEEL AVIATION SERVICES</h2>
<h2 style="color:blue" align="center"> Boarding Pass</h2>
<p class ="x5" style="font-size:28px" ;> Date: <u><strong><span class="name">@{items('Apply_to_each')?['Date']}</span></strong></u></p>
<p class ="x1" style="font-size:28px">Name: <u class="underline"><strong><span class="name">@{items('Apply_to_each')?['Name1']}</span></strong></u></p>
<p class ="x2" style="font-size:28px">Aircraft Regn: <u class="underline"><strong><span class="name">@{items('Apply_to_each')?['AircraftRegn']?['Value']}</span></strong></u></p>
<p class ="x3" style="font-size:28px">Sector: <u class="underline"><strong><span class="name">@{items('Apply_to_each')?['Sector']}</strong></span></u></p>
<p class ="x4" style="font-size:22px" >Signature: <u ><strong><span class="name">@{items('Apply_to_each')?['Signature']}</span></strong></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
我尝试 margin-left 并且它有效,但是在使用 margin-left 时,背景颜色变为白色。我如何在这里使用 padding-left 做同样的事情。
这是我使用左边距时的图像:
这是我使用 padding-left 时的图像

