美文网首页
实现背景图模块

实现背景图模块

作者: 逸笛 | 来源:发表于2020-11-26 09:15 被阅读0次
图片.png
  //我的积分
  renderIntegral() {
    return (
      <View className="myIntegralView">
        <Image className="bg" src={require("../../assets/my/sign/bg.png")} />
        <View className="myIntegral">
          <View className="topView">
            <Text className="dot"></Text>
            <Text className="line"></Text>
            <Text className="integral">我的积分</Text>
            <Text className="line"></Text>
            <Text className="dot"></Text>
          </View>
          <Text className="num">50</Text>
          <Text className="desc">连续签到领翻倍积分</Text>
        </View>
      </View>
    );
  }
 //我的积分
  .myIntegralView {
    position: relative;
    left: 30px;
    top: 27px;
    width: 690px; //图片宽度
    height: 246px; //图片高度

    .bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }

    .myIntegral {
      position: absolute;
      top: 40px;
      left: 50%;
      transform: translateX(-50%);
      color: #996f23;
      display: flex;
      flex-direction: column;
      align-items: center;

      .topView {
        display: flex;
        align-items: center;
        font-size: 28px;

        .integral {
          margin: 0 14px;
        }

        .dot {
          width: 6px;
          height: 6px;
          background-color: #996f23;
          margin-right: 4px;
        }

        .dot:last-child {
          margin-left: 4px;
        }

        .line {
          width: 21px;
          height: 6px;
          background-color: #996f23;
        }
      }

      .num {
        font-size: 60px;
        font-weight: bold;
        margin: 10px 0 20px 0;
      }

      .desc {
        font-size: 24px;
      }
    }

  }

相关文章

  • 实现背景图模块

  • [Flutter]设置背景图片

    需求:给整个屏幕设置背景图片。 实现:可以通过给Container设置BoxDecoration实现背景图片效果。...

  • css实现网格背景

    实现代码 background-image 属性为元素设置背景图像。background-size 规定背景图...

  • Flutter布局尝试

    官方的例子实现 1. 实现图片模块 2. 实现标题模块 3. 实现按钮模块 4. 实现正文模块 5. 整合所有模块...

  • 图片文件命名规范

    1,背景图片命名 开发模块文件名称_bg.png/jpg/gif例如登录模块(login): login_bg.p...

  • iOS绘制渐变色背景

    iOS实现颜色渐变 我们在平时开发经常就用一个图片来代替背景图,但是如果没有背景图片,怎么实现下面的效果?今天的这...

  • 15日作业编程题

    实现效果:百度产品更多侧边栏实现(用背景图片的方式插入) 效果 代码实现

  • Android中Button的形状及背景

    效果如下: 代码实现,就是给Button设置一个背景图,这个背景图用选择器selector写成:

  • css实现双重背景图,过度动画,缩放等

    background-attachment: fixed;background-size: cover;实现背景图...

  • 2021-07-19

    前言: 效果预览: 普通实现: 新增模块: 模块化实现: 新增模块: 方案对比: 总结:

网友评论

      本文标题:实现背景图模块

      本文链接:https://www.haomeiwen.com/subject/sjhaiktx.html