xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

CSS background & background-image & border-image All In One

CSS background & background-image & border-image All In One

background


background-image


border-image



background & radius border

background color & view bug

https://codepen.io/xgqfrms/full/JQeqXQ


linear-gradient

https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient

https://codepen.io/xgqfrms/pen/WqEBLB

https://codepen.io/xgqfrms/pen/bPrymz

background-size

cover

https://developer.mozilla.org/zh-CN/docs/Web/CSS/background-size


.circle {
    position: absolute;
    width: 1.76rem;
    height: 1.56rem;
    line-height: 1.56rem;
    /* background: url("../../images/guide/hexagon.png") cover no-repeat center center ; */
    background: url("../../images/guide/hexagon.png") no-repeat center center ;
    background-size: cover;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    font-size: 0.28rem;
    /* font-size: 0.16rem; */
    color: #fff;
}

/* iphone 6/7/8 */
/* width: 375px & height: 667px */
@media (min-width: 375px) and (max-width: 375px) and (orientation: portrait) {
    .circle {
        position: absolute;
        width: 1.76rem;
        height: 1.76rem;
        line-height: 1.56rem;
        background: url("../../images/guide/hexagon.png") no-repeat center center;
        text-align: center;
        vertical-align: middle;
        cursor: pointer;
        font-size: 0.16rem;
        color: #fff;
    }
    .menu-text31 {
        transform: translateX(0.55rem) translateY(-0.15rem);
    }
    .menu-text32 {
        transform: translateX(-0.35rem) translateY(0.3rem);
    }
}

/* iphone 6/7/8 plus*/
/* width: 414px & height: 736px */
@media (min-width: 414px) and (max-width: 414px) and (orientation: portrait) {
    .circle {
        position: absolute;
        width: 1.76rem;
        height: 1.56rem;
        line-height: 1.56rem;
        background: url("../../images/guide/hexagon.png") no-repeat center center;
        text-align: center;
        vertical-align: middle;
        cursor: pointer;
        font-size: 0.16rem;
        color: #fff;
    }
    .menu-text31{
        transform: translateX(0.45rem) translateY(-0.15rem);
    }
    .menu-text32{
        transform: translateX(-0.35rem) translateY(0.2rem);
    }
}

demo

css background-image & linear-gradient

.text-brand-yellow-pink {
    --tw-gradient-from: #fed038;
    --tw-gradient-stops: var(--tw-gradient-from),var(--tw-gradient-to,rgba(254,208,56,0));
    --tw-gradient-to: #ff0d6a;
}

.text-brand-yellow-pink, .text-ukraine-gradient {
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(to right,var(--tw-gradient-stops));
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    color: transparent;
}

https://gatsbyconf.com/

refs

https://developer.mozilla.org/en-US/docs/Web/CSS/background

https://developer.mozilla.org/en-US/docs/Web/CSS/background-image

https://developer.mozilla.org/en-US/docs/Web/CSS/border-image



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @   xgqfrms  阅读(447)  评论(3编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2016-06-26 cookie 和session 的区别:
2015-06-26 爱因斯坦出的一道思考题,全球只有 2% 的人才可以解出!All In One
点击右上角即可分享
微信分享提示