CSS3制作CD封面 (好像可以说是光盘..

Posted on Dec 27, 2014

突发奇想,想用css做个光盘..

反正闲着,就尝试一下看看能不能弄出来…

效果图

写得很蛋疼,用一个个圆定位上去的(好像这种写法很垃圾…..

上代码~~

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="author" content="Xoris">
        <meta http-equiv="Content-Type" content="text/html" charset="utf-8">
        <title>CD Cover</title>
        <style type="text/css">
.CD {
	margin: auto auto auto -250px;
	width: 500px;
	height: 500px;
	background: none repeat scroll 0% 0% #0253A2;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	border-radius: 50%;
	box-shadow: 0px 0px 0px 5px rgba(173, 157, 169, 0.4);
	position: absolute;
	opacity: 0.80;
	left: 50%;
	top: 55px;
}

.CD2 {
	width: 165px;
	height: 165px;
	background: none repeat scroll 0% 0% rgba(27, 27, 27, 0.93);
	border-radius: 50%;
	box-shadow: 0px 0px 0px 5px rgba(173, 157, 169, 0.4);
	position: relative;
	left: 167px;
	top: 167px;
	opacity: 0.80;
}

.CD3 {
	width: 60px;
	height: 60px;
	background: none repeat scroll 0% 0%    #fff;
	border-radius: 50%;
	box-shadow: 0px 0px 0px 5px rgba(173, 157, 169, 0.4);
	position: absolute;
	left: 52px;
	top: 52px;
	opacity: 0.70;
}

.CD:after {
	margin-left: -250px;
	color: #FFF;
	text-align: center;
	font-size: 43px;
	font-weight: bold;
	font-family: "Times New Roman",serif;
	text-shadow: 0px 0px 40px #000, 0px -1px 0px #F3F3F3, 0px -2px 0px #F3F3F3;
	width: 500px;
	content: "CD Cover";
	position: absolute;
	left: 50%;
	top: 55px;
}

.CD:before {
	margin-left: -250px;
	color: #FFF;
	text-align: center;
	font-size: 16px;
	font-family: 'Comic Sans MS', cursive, sans-serif;
	width: 500px;
	content: "CD Cover Base On CSS3\AXoris [flylai.com]\A 2014.12.27";
	white-space: pre;
	position: absolute;
	left: 50%;
	top: 385px;
}
        </style>
    </head>
    <body style="background-image:url(bg.jpg);background-attachment:fixed;">
        <div class="CD">
            <div class="CD2">
                <div class="CD3"></div>
            </div>
        </div>
    </body>
</html>

再改下可以当作电台的cd封面啥的..

各位自己发挥。

望各位路过的大神指导~~

背景自己改= =

木有演示地址..