css实现印章效果

效果

在这里插入图片描述

代码实现

直白的说就是两个有boder的圈,字体相对圈圈绝对定位,倾斜使用到transform的rotate属性。下面展示一些 内联代码片

// 页面
<view style="margin-bottom: 20rpx;position: relative;">
	<view class="tui-col-12" style="display: flex;">
		<view class="tui-col-4 tui-center dotted" style="font-size: 60rpx;color: #fff;">
			<span style="font-size: 40rpx;">&yen;</span>20
		</view>
		<view class="tui-col-8 fcss"
			style="background-color: #fff;height: auto;padding: 20rpx;border-bottom: 4rpx dotted rgba(185, 185, 185,.3);">
			<view>新用户注册赠券</view>
			<view style="color: #B4B4B4;font-size: 26rpx;">2021.08.12 2359到期</view>
			<view style="margin-top: 40rpx;color: #B4B4B4;font-size: 26rpx;">使用说明
				<tui-icon color="#B4B4B4" name="arrowdown" :size="16"></tui-icon>
			</view>
		</view>
	</view>
	<view class="tui-col-12 fcss" style="background-color: #fff;height: auto;">
		<view
			style="table-layout: fixed;word-wrap: break-all;word-break: pre-wrap;overflow: hidden;margin: 15rpx;font-size: 26rpx;color: #B4B4B4;">
			*本券为新用户注册奖励赠券
		</view>
	</view>
	<!-- 印章效果 -->
	<view class="seal" style="position: absolute;right: 10rpx;top: 14rpx;">
		<view class="seal-son">
			<span style="position: absolute;top: 32rpx;text-align: center;font-size: 35rpx;transform: rotate(-45deg);right: 40rpx;color: #B4B4B4;font-weight: 900;">已使用</span>
			<span style="position: absolute;top: 66rpx;text-align: center;font-size: 20rpx;transform: rotate(-45deg);left: 40rpx;color: #B4B4B4;">2021.08.09 23:59</span>
		</view>
	</view>
</view>
.seal{
	width: 160rpx;
	height: 160rpx;
	border: solid 6rpx #B4B4B4;
	border-radius: 100%;
	background-color: rgba(255, 255, 255, 0.8);
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
}
.seal-son{
	width: 145rpx;
	height: 145rpx;
	border: solid 2rpx #B4B4B4;
	border-radius: 100%;
	background-color: rgba(255, 255, 255, 0.8);
	position: relative;
}
  • 3
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

茶茶呀

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值