gpt4 book ai didi

css - 试图复制这个 CSS3 按钮

转载 作者:行者123 更新时间:2023-11-28 11:52:43 24 4
gpt4 key购买 nike

尝试解决此处发布的第一个问题:http://css-tricks.com/interview-questions-css/?utm_source=buffer&utm_campaign=Buffer&utm_content=bufferb57be&utm_medium=facebook

我的粗略尝试:http://jsfiddle.net/Mbg82/1/

<span class="buttonContainer">
<span class="button">
<span class="star">&#9733;</span>
Checkout
<span class="star">&#9733;</span>
</span>
</span>
<style>
.buttonContainer {
background-color: #ccc;
border-radius: 20px;
border: 3px solid #fff;
padding: 5px;
margin: 10px 30px;
display: inline-block;
box-shadow: -0px 0px 1px 1px #000;
}

.button {
background-color: #eee;
border-radius: 10px;
border: 1px solid #777;
padding: 10px;
margin: 5px;
display: inline-block;
text-transform: uppercase;
font: bold 26px "arial";
color: #555;
background-image: -moz-linear-gradient(bottom, #aaa 10%, #eee 90%);
}

.star {
font-size: 32px;
color: #777;
}
</style>

我无法在按钮本身上获得光泽效果 - 你能帮我吗?

最佳答案

检查此链接 http://jsfiddle.net/modaloda/Mbg82/2/

我用 http://www.colorzilla.com/gradient-editor/获得光泽效果

background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #d1d1d1 50%, #bcbcbc 51%, #f6f6f6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(50%,#d1d1d1), color-stop(51%,#bcbcbc), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#d1d1d1 50%,#bcbcbc 51%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#d1d1d1 50%,#bcbcbc 51%,#f6f6f6 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#d1d1d1 50%,#bcbcbc 51%,#f6f6f6 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#d1d1d1 50%,#bcbcbc 51%,#f6f6f6 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */

关于css - 试图复制这个 CSS3 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20235810/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com