【问题标题】:How to make it responsive using css如何使用CSS使其响应
【发布时间】:2023-01-25 15:50:40
【问题描述】:

下面的代码是我的 css,我正在尝试使用另一个 css 添加一个图标,但是图标 css 没有响应我如何才能让它响应。

.iconbox-singleD1 {
    background: rgba(160, 215, 231, 0.85);
    border-radius: 8px;
    padding: 25px 20px;
    margin-bottom: 30px;
    -webkit-border-radius: 8px;
    box-shadow: 0px 2px 20px rgba(74, 141, 245, 0.2);
    -webkit-box-shadow: 0px 2px 20px rgba(74, 141, 245, 0.2);
    -ms-flex-pack: justify;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 24px;
}
.iconbox-singleD1.active:before{
    opacity:1;
}
.iconbox-singleD1:before{
    content: "";
    position: absolute;
    top: 100%;
    left: 21px;
    right: 21px;
    height: 6px;
    border-radius: 0 0 6px 6px;
    background: rgb(209 243 253 / 85%);
    /* opacity: 0;
    -webkit-transition: opacity .25s;
    -o-transition: opacity .25s; */
    transition: opacity .25s;
}
.iconbox-singleD1.iconbox-singl {
    background: #fff;
    margin-bottom: 30px;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;    
}

.iconbox-singleD1 .box-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iconbox-singleD1 p {
    margin: 0 0 5px 0;
    /* text-transform: uppercase; */
    font-weight: 400;
    font-size: 14px;
    /* color: #0d1f3c; */
    color: #fff;
}
.iconbox-singleN1 h5 {
    margin: 0;
    font-size: 30px;
    font-weight: 500;
    color: #0d1f3c;
}

这是 html 框架。在这里,我将另一个 css 用于图标 div 标记,我如何与上面的 css 结合以使其响应。

<div class="col-lg-6">
          <div class="iconbox-singleD1">
            <div class="box-title">
              <div>
                <p>New Patients</p>
                <h5 class="Dashboard-header-color">{{todaysAppointment}}</h5>
              </div>
              <div class="padLeftIcon">
                <mat-icon>hotel</mat-icon>
              </div>
            </div>       
          </div>
        </div>

这是我在图标 div 标签中使用的 css

.padLeftIcon{
    position: absolute;
    left: 173px;
    width: 100%;
    height: 100%;
}

【问题讨论】:

    标签: css


    【解决方案1】:

    您可以使用字体大小时间例如字体大小:1.2em;

    【讨论】:

    • 你能给我一个工作的CSS吗
    猜你喜欢
    • 2015-04-08
    • 2017-11-14
    • 2014-10-17
    • 1970-01-01
    • 1970-01-01
    • 2014-11-14
    • 2015-01-20
    • 2014-05-24
    • 1970-01-01
    相关资源
    最近更新 更多