html - 如何将文本移动到框的末尾?
问题描述
我创建了两个弹性盒子。左侧的框显示图像。右侧的框显示文本,但它必须显示在框的末尾。
.Details {
background-color: yellow;
display: inline;
}
p span {
background-color: yellow;
}
.End {
display: inline;
}
.End {
display: flex;
}
.End.img {
justify-content: left;
}
.End.p {
justify-content: right;
}
<div class="End">
<img src="http://www.intro-webdesign.com/images/newlogo.png">
<div id="BLOCK">
<p>This page was created by <span class="MyName">nameh dhreh</span> and Colleen Van Lent.To learn more about web design, visit <a href="http://www.intro-webdesign.com">Intro To Web Design</a>.</p>
</div>
</div>
解决方案
如果您的意思是在“框的末尾”右对齐文本 -
.Details {
background-color: yellow;
display: inline;
}
p span {
background-color: yellow;
}
.End {
display: inline;
}
.End {
display: flex;
}
.End.img {
justify-content: left;
}
.End.p {
justify-content: right;
}
#BLOCK {
text-align: right;
}
<div class="End">
<img src="http://www.intro-webdesign.com/images/newlogo.png">
<div id="BLOCK">
<p>This page was created by <span class="MyName">Madiha Gurchani</span> and Colleen Van Lent.To learn more about web design, visit <a href="http://www.intro-webdesign.com">Intro To Web Design</a>.</p>
</div>
</div>
推荐阅读
- ajax - 如何在wordpress中为ajax结果添加分页
- node.js - package.json 文件中的 npm 错误
- ruby-on-rails - 等效于 Rails 4.2 中的 app.executor.to_run 和 .to_complete
- javascript - 从另一台计算机调用我的页面时,httprequest 不起作用
- html - 离子载玻片中的离子卡全高
- javascript - 通过 Javascript 获取数组或对象的名称
- java - Java JNDI 查找名称兼容 Tomcat 和 Weblogic
- android - 将css渐变转换为android渐变(xml)
- php - mysqli_query() 失败 MAMP Phpmyadmin PHP
- python - 根据输入显示不同的字符串