Comments (2)
模板中有提供 mixin
/**
* 1像素边框
* @param {string} $position [边框位置,取值:top, bottom, left, right, full]
* @param {string} $borderColor [边框颜色]
* @param {number} $raidus [圆角]
*
* 例子:
* @include border(top, #ddd);
* @include border(full, #ddd, 2px);
*/
@mixin border($position: full, $borderColor: #ddd, $radius: 0) {
content: '';
position: absolute;
z-index: 1;
pointer-events: none;
background-color: $borderColor;
@if $position == top {
height: 1px;
left: 0;
right: 0;
top: 0;
@media only screen and (-webkit-min-device-pixel-ratio:2) {
& {
transform: scaleY(0.5);
transform-origin: 50% 0%;
}
}
} @else if $position == bottom {
height: 1px;
left: 0;
right: 0;
bottom: 0;
@media only screen and (-webkit-min-device-pixel-ratio:2) {
& {
transform: scaleY(0.5);
transform-origin: 50% 100%;
}
}
} @else if $position == left {
width: 1px;
top: 0;
bottom: 0;
left: 0;
@media only screen and (-webkit-min-device-pixel-ratio:2) {
& {
transform: scaleX(0.5);
transform-origin: 0% 50%;
}
}
} @else if $position == right {
width: 1px;
top: 0;
bottom: 0;
right: 0;
@media only screen and (-webkit-min-device-pixel-ratio:2) {
& {
transform: scaleX(0.5);
transform-origin: 100% 50%;
}
}
} @else if $position == full {
top: 0;
bottom: 0;
left: 0;
right: 0;
background: none;
border: 1px solid #ddd;
border-color: $borderColor;
@if $radius != 0 {
border-radius: $radius;
}
@media only screen and (-webkit-min-device-pixel-ratio:2) {
& {
right: -100%;
bottom: -100%;
transform: scale(0.5);
transform-origin: 0% 0%;
$radiusx2: null;
@each $i in $radius {
$radiusx2: append($radiusx2, $i * 2);
}
@if $radius != 0 {
border-radius: $radiusx2;
}
}
}
}
}
from elf.
没问题先关闭了
from elf.
Related Issues (20)
- elf.aotu.io 网页上的 Preloader 错误链接到了 Swiper 官网 HOT 1
- 模版无法下载,404了 HOT 4
- 关于微信友好支持,分享之类的在哪里配置,没看出来。 HOT 2
- elf command not found HOT 2
- 技术交流 HOT 1
- 这项目不维护了么?或者不发展了么? HOT 1
- 我在elf.config.js里面添加别名为何无效 HOT 3
- Linux 安装报依赖错误 HOT 1
- build的时候静态资源无法设置cdn前缀吗?
- ico图标文件不能够引入 HOT 14
- elf start error HOT 1
- translate3d被转换
- Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime HOT 2
- es5 无法转es6 HOT 1
- 打包出现Unexpected token name «i», expected punc «;» [js/bundle.js:125,13] HOT 1
- phantomjs下载非常耗时 HOT 1
- 对电脑触摸屏似乎无效 HOT 4
- npm install失败 HOT 2
- downloading template 一直没有进度
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elf.