CSS3 酒杯配色总是这么逊色。。。。哎。

从大漠那看CSS 从小熊 以及各个UED们那看JS,最近开始筹备深入学习 HTML5 CSS3的东西。

酒杯如琉璃,杯盘如翡翠。

复制代码
    #desk{
        width: 150px;
        height: 280px;
    }
        #demo{
            width: 100px;
            height: 200px;
            opacity: 1;
            position: relative;
        }
        #demo:before{
            content: "";
            width: 80px;
            height: 85px;
            border: 1px solid #ccdfff;
            border-radius: 15% 15% 95% 95% / 95% 95% 100% 100%;
            background: -moz-radial-gradient(left bottom , #bbbbcc, #ccccdd 30%, #ccccee) repeat scroll 0 0 transparent;
            opacity: 1;
            position: absolute;
            left: 0;
            top: 20px;
        }
        #demo:after{
            content: "";
            width: 70px;
            height: 20px;
            border: 1px solid #ccccff;
            border-radius: 100%/ 100%;
            background: -moz-radial-gradient(right top , #bbccff, #ddeeff, #FFFFFF) repeat scroll 0 0 transparent;
            position: absolute;
            box-shadow: 1px #fff inset;
            left: 5px;
            top: 10px;
        }
        #column{
            width: 10px;
            height: 70px;
            background: -moz-linear-gradient(left, #aabbff, #aabbdd, #bbccff, #bbddff);
            position: absolute;
            left: 37px;
            top: 106px;
            border-radius: 0 0 10px 10px;
            
        }
        #column:before{
            content: "";
            background: -moz-radial-gradient(left, #aabbff, #bbbbff, #ccccff);
            width: 100px;
            height: 20px;
            border: 1px solid #ddf;
            box-shadow: 1px #fff inset;
            border-radius: 100%;
            position: absolute;
            left: -45px;
            top: 60px;
            z-index: -1;
        }
        #wine{
            width: 100px;
            height: 100px;
            position: relative;
        }
        #wine:before{
            content: "";
            width: 74px;
            height: 50px;
            border-radius: 0% 0% 50% 50% / 30% 30% 100% 100%;
            background: -moz-radial-gradient(left bottom, #cc3333, #aa1111, #bb2222 30%, #eeeeee);
            position: absolute;
            left: 4px;
            top: 50px;
        }
        #wine:after{
            content: "";
            width: 74px;
            height: 20px;
            position: absolute;
            left: 4px;
            top: 40px;
            border-radius:100%;
            background: -moz-radial-gradient(center center , #AA1111, #CC3333, #BB2222, #DDAAAA, #FF9999) repeat scroll 0 0 transparent;
        }
复制代码

 

CSS代码如上。关于IE的样式 亲,自己搞吧。我是最不喜欢搞IE的了。。

整体呢,就是先画个杯子的主要部分, 再画个椭圆当杯子口,然后画个杯子的柱子底座什么的就简单了。。。还是觉得不好看。。。

DOM结构就是

    <div id="desk">
        <div id="demo"><div id="wine"></div><div id="column"></div></div>
    </div>

 

--! 是不是难看的要死了。。。反正我是hold不住了。。要死的心都有了。。。怎么这么难看。。。。

posted @   AlfredLee  阅读(402)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
点击右上角即可分享
微信分享提示