css实现文字颜色渐变+阴影

效果

在这里插入图片描述

代码

<div class="top">
	<div class="top-text" text="总经理驾驶舱">总经理驾驶舱</div>
</div>

<style lang="scss" scoped>
	.top{
	  width: 100%;
      text-align: center;
      height: 80px;
      line-height: 80px;
      font-size:40px;
      font-weight: bold;
      color: white;
      font-family: 'microsoftyahei';

      .top-text{
        background: linear-gradient(to bottom, #6fb0ff, #e3eeff, #ffff, #ffff);
        -webkit-background-clip: text;
        color: transparent;
      }
</style>

你可能感兴趣的:(前端,css,前端)