html - how to make text followed by a rectangle box filled with color html css with responsive
问题描述
I need a small help regarding simple html and css inside a grid.
like to attach a image which i actually want to achieve
#rectangle {
width: 100%;
height: 40px;
background: #8DB23F;
}
<div class="row">
<div class="col-md-12" id="rectangle"><span id="first" style="background-color:white;color:#8DB23F;font-size:40px;padding:7px 0px 2px 1px;border-color:white;margin-left: -15px;"><strong> JAW CRUSHER </strong></span></div>
</div>
I have achieved this as time arround please help me fix this issue (not responsive)
解决方案
这是一个建议,它将适用于平面背景颜色和单行文本。试一试。
.row {
width: 100%;
height: 40px;
background: #8DB23F;
}
.row strong{
line-height: 40px;
background: white;
display: inline-block;
}
<div class="row">
<strong> JAW CRUSHER </strong>
</div>
推荐阅读
- typescript - 如何在 Backlogs 窗口中获取选定的 Backlog 项目?
- java - 如何更改 TestNG 报告中的异常消息
- java - 如何检查一个数字的每个数字是否大于或等于另一个数字?
- javascript - 如何禁用默认视频控件并显示自定义搜索栏
- c# - 仅删除列表中的第一个字符
- blockchain - 如何确保每个人都有正确有效的块状
- c# - 使用 Math.Round 函数在 C# 中的 Excel 工作表中将输入的数字转换为只有 2 个小数
- mysql - MySQL 显示第 n 个日期
- php - 如何使用 postman 为 web 服务设置 .php 文件的 url 和参数?
- bootstrap-4 - 为什么主容器在 nav 后面?