vue 实现邮戳边缘
效果:

vue:
<template>
<div class="couponItem">
<div class="itemLeft">
<span class="tagDiv">
<span class="tagLeft">折</span>
</span>
<div>
<p class="price"><strong class="priceNum">{{coupon.cdiscount}}</strong>
<span class="priceIcon">折</span></p>
<p class="coupon">满 {{coupon.minimum}} 元可使用</p>
<p class="coupon">无金额门槛</p>
</div>
</div>
<div class="itemRight">
<p class="couponName"><span class="shopTag">店铺:</span>{{coupon.deptname}}</p>
<p class="useRluer">{{coupon.cname}}</p>
<p class="useTime"><i class="timeEnd">{{coupon.validstart}}至{{coupon.validend}}</i><span class="rightBtn">立即使用</span></p>
</div>
</div>
</template> <script>
export default {
data() {
return {
coupon: {
'cdiscount': 8.8,
'minimum': 10,
'deptname': '好又多',
'cname': '全店通用',
'validstart': '2019-06-26',
'validend': '2019-06-30'
}
}
},
methods: {},
}
</script> <style scoped>
i {
font-style: normal;
} .couponItem {
width: 100%;
height: 1rem;
font-size: .14rem;
position: relative;
overflow: hidden;
background: #fff;
padding: 0 .05rem;
box-sizing: border-box;
text-align: left;
display: flex;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: -moz-flexbox;
margin: 1rem 0;
} .itemLeft {
width: 33%;
height: 100%;
background: -webkit-linear-gradient(left, #fa7f6d, #fc5e75);
/* Safari 5.1 - 6.0 */
background: -o-linear-gradient(right, #fa7f6d, #fc5e75);
/* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(right, #fa7f6d, #fc5e75);
/* Firefox 3.6 - 15 */
background: linear-gradient(to right, #fa7f6d, #fc5e75);
/* 标准的语法 */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
margin-right: .1rem;
text-align: center;
} .itemLeft:before {
content: ' ';
width: 0;
height: 100%;
position: absolute;
top: 10px;
right: -2px;
border-right: 3px dotted white;/* 控制右边花纹大小 */
} .itemRight {
flex: 1;
-webkit-box-flex: 1;
-ms-flex: 1;
-moz-flex: 1;
} .rightBtn {
width: .7rem;
color: #fa644b;
border: 1px solid #fa644b;
text-align: center;
font-size: .12rem;
border-radius: 8px;
padding: .03rem 0;
} .coupon {
font-size: .12rem;
text-align: center;
color: #f4f4f4;
white-space: nowrap;
-webkit-transform: scale(0.80);
} .priceIcon {
font-size: .14rem;
margin-left: .05rem;
color: #ffffff;
} .itemLeftBttom {
font-size: .12rem;
} .price {
display: flex;
align-items: center;
justify-content: center;
} .priceNum {
font-size: .3rem;
letter-spacing: -2px;
color: #ffffff;
} .couponName {
font-size: .12rem;
padding: .05rem 0;
margin: .01rem 0 .16rem 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: rgb(77, 77, 77);
} .useRluer {
font-size: .14rem;
color: #4d4d4d;
margin-bottom: .03rem;
border-bottom: 1px dashed #cccccc;
} .useTime {
height: .3rem;
display: flex;
justify-content: space-between;
align-items: center;
font-size: .12rem;
color: #999;
} .timeEnd {
font-size: .12rem;
-webkit-transform-origin-x: 0;
-ms-transform: scale(0.8);
/* IE 9 */
-moz-transform: scale(0.8);
/* Firefox */
-webkit-transform: scale(0.8);
/* Safari 和 Chrome */
-o-transform: scale(0.8);
} .tagDiv {
background: #ff9900;
color: #fff;
position: absolute;
transform: rotate(-45deg);
font-size: .12rem;
left: -.2rem;
text-align: center;
top: -.05rem;
padding: 0 .28rem;
height: .3rem;
line-height: .3rem;
} .tagLeft {
position: absolute;
top: .035rem;
left: .22rem;
transform: rotate(45deg);
font-size: .14rem;
font-weight: bold;
}
</style>
vue 实现邮戳边缘的更多相关文章
- React 还是 Vue: 你应该选择哪一个Web前端框架?
学还是要学的,用的多了,也就有更多的认识了,开发中遇到选择的时候也就简单起来了. 本文作者也做了总结: 如果你喜欢用(或希望能够用)模板搭建应用,请使用Vue 如果你喜欢简单和“能用就行”的东西 ...
- vue UI库iview源码解析(2)
上篇问题 在上篇<iview源码解析(1)>中的index.js 入口文件的源码中有一段代码有点疑惑: /** * 在浏览器环境下默认加载组件 */ // auto install if ...
- 一个能拖动,能调整大小,能更新bind值的vue指令-vuedragx
一. 背景说明 开发一个可自定义组件化门户配置页面,期间采用了vue框架作为前端视图引擎,作为一个刚入手vue的萌新,开发第一个功能就遇到了拦路虎.需要一个拖动并且可改变大小的容器盒子.当时查看vue ...
- Vue.Draggable 文档总结
本文章转自https://blog.csdn.net/zjiang1994/article/details/79809687 Vue.Draggable学习总结 Draggable为基于Sortabl ...
- vue和react全面对比(详解)
vue和react对比(详解) 放两张图镇压小妖怪 本文先讲共同之处, 再分析区别 大纲在此: 共同点: a.都使用虚拟dom b.提供了响应式和组件化的视图组件 c.注意力集中保持在核心库,而将其他 ...
- Vue修饰符
为了方便大家写代码,vue.js给大家提供了很多方便的修饰符,比如我们经常用到的取消冒泡,阻止默认事件等等~ 目录 表单修饰符 事件修饰符 鼠标按键修饰符 键值修饰符 v-bind修饰符(实在不知道叫 ...
- 浅尝Vue.js组件(一)
本篇目录: 组件名 组件注册 全局注册 基础组件的自动化全局注册 局部注册 在模块系统中局部注册 Prop 单向数据流 Prop验证 类型检查 非Prop特性 替换/合并已有的特性 禁用特性继承 自定 ...
- vue案例 - vue-awesome-swiper实现h5滑动翻页效果
说到h5的翻页,很定第一时间想到的是swiper.但是我当时想到的却是,vue里边怎么用swiper?! 中国有句古话叫:天塌下来有个高的顶着. 在前端圈里,总有前仆后继的仁人志士相继挥洒着热汗(这里 ...
- vue深入了解组件——自定义事件
一.事件名 跟组件和prop不同,事件名不存在任何自动化的大小写转换.而是触发的事件名需要完全匹配监听这个事件所用的名称.举个例子,如果重复啊一个camelCase名字的事件: this.$emit( ...
随机推荐
- C#学习笔记----反射基础
反射基础 反射用于在程序运行过程中,获取类里面的信息或发现程序集并运行的一个过程.通过反射可以获得.dll和.exe后缀的程序集里面的信息.使用反射可以看到一个程序集内部的类,接口,字段,属性,方法, ...
- 接口测试 java+httpclient+testng+excel
最近项目不忙,研究了下java实现接口自动化,借助testng+excel实现数据驱动 目前只用post方式测试,返回结果列没有通过列名去找 另外,请求参数是转义之后的,接口之间的依赖也是个问题,批量 ...
- drop database出现1010
> drop database glc; ERROR (HY000): Error dropping database (can't rmdir './glc/', errno: 17) Fri ...
- tomcat8乱码问题
1:注册表里修改 1):找到 HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe 如果 该项下已存在CodePage项,则把值改为十进制” ...
- vuecli脚手架+vue+vuex实现vue驱动的demo。
哎呀呀呀,现在大家都要会Vue || React,否则感觉跟这个前端的世界脱节了一样. start: vue-cli这个构建工具大大降低了webpack的使用难度,支持热更新,有webpack-de ...
- hexo next中遇到的bug,引发出的关于jquery中click()函数和on("click",function())的区别
个人博客:https://mmmmmm.me 源码:https://github.com/dataiyangu/dataiyangu.github.io 背景: 本人在维护博客的时候加入了aplaye ...
- STM32F4X 关于MDK上虚拟串口调试
1. 下载安装VSPD 自行百度安装后,利用VSPD将PC上的两个虚拟串口连接起来.如图我将COM1 和COM2连接起来. a. 点击Addr pair. 可以看到Virtual ports上将两个虚 ...
- Jan&Feb 工作总结
一.工作任务: 熟悉dcbi项目(运维经分系统),完成指定需求. 熟悉bi项目(数据分析平台),完成指定需求. steel circus 主机游戏官网制作. 一拳超人游戏预注册页wap手机端制作. 二 ...
- 网络安全系列 之 SQL注入学习总结
目录 1. sql注入概述 2. sql注入测试工具 3. sql注入防御方法 3.1 问题来源 3.2 防御方法 4. SQL注入防御举例 4.1 使用JDBC时,SQL语句进行了拼接 4.2 使用 ...
- Linux-c线程创建
{ pthread_attr_t attr;//线程属性 , err_sav; if (!pThreadId) { errno = EINVAL; ; } memset(&attr, , si ...