01.
<?php
02.
$r
=
$_REQUEST
;
03.
if
( (
$no_rq
= !isset(
$r
[
'width'
])) ){
04.
$r
=
array
(
05.
'width'
=>30,
'height'
=>30,
06.
'left'
=>50,
'top'
=>100,
07.
'RW'
=>30,
'RH'
=>30,
08.
'degree'
=>45,
09.
'c1'
=>
'red'
,
'c1p'
=>0,
10.
'c2'
=>
'green'
,
'c2p'
=>100,
11.
'c3'
=>
'blue'
,
'c3p'
=>100
12.
);
13.
}
14.
$rd
=
"radial-gradient( $r[RW]px $r[RH]px $r[degree]deg, circle cover, $r[c1] $r[c1p]%, $r[c2] $r[c2p]%, $r[c3] $r[c3p]%);\n"
;
15.
16.
$ff
= preg_match(
'/Firefox/'
,
$_SERVER
[
'HTTP_USER_AGENT'
]);
17.
$ch
= !
$ff
&& preg_match(
'/Chrome/'
,
$_SERVER
[
'HTTP_USER_AGENT'
]);
18.
$ie
= !
$ff
&& !
$ch
;
19.
if
(
$no_rq
):
22.
<head>
23.
<title>Untitled Document</title>
24.
<style>
25.
@keyframes spin {
26.
from { transform: rotate(0deg); }
27.
to { transform: rotate(360deg); } }
28.
<?php
if
(
$ch
):?>
29.
@-webkit-keyframes spin {
30.
from { -webkit-transform: rotate(0deg); }
31.
to { -webkit-transform: rotate(360deg); } }
32.
<?php
endif
;?>
33.
<?php
if
(
$ff
): ?>
34.
@-moz-keyframes spin {
35.
from { -moz-transform: rotate(0deg); }
36.
to { -moz-transform: rotate(360deg); } }
37.
<?php
endif
;?>
38.
<?php
if
(
$ie
): ?>
39.
@-ms-keyframes spin {
40.
from { -ms-transform: rotate(0deg); }
41.
to { -ms-transform: rotate(360deg); } }
42.
<?php
endif
;?>
43.
</style>
44.
</head>
45.
<body>
46.
<?php
endif
;
47.
?>
48.
<div style="z-index: 99; position: fixed; border-radius: 50%;
49.
width: <?=
$r
[
'width'
]?>px; height: <?=
$r
[
'height'
]?>px; left: <?=
$r
[
'left'
]?>px; top: <?=
$r
[
'top'
]?>px;
50.
<?=
$rd
?>
51.
background-image: <?=
$rd
?>
52.
animation-name: spin;
53.
animation-duration: 3s;
54.
animation-iteration-
count
: infinite;
55.
animation-timing-
function
: linear;
56.
<?php
if
(
$ch
):?>
57.
background-image: -webkit-<?=
$rd
?>
58.
-webkit-animation-name: spin;
59.
-webkit-animation-duration: 3s;
60.
-webkit-animation-iteration-
count
: infinite;
61.
-webkit-animation-timing-
function
: linear;
62.
<?php
endif
;?>
63.
<?php
if
(
$ff
): ?>
64.
background-image: -moz-<?=
$rd
?>
65.
-moz-animation-name: spin;
66.
-moz-animation-duration: 3s;
67.
-moz-animation-iteration-
count
: infinite;
68.
-moz-animation-timing-
function
: linear;
69.
<?php
endif
;?>
70.
<?php
if
(
$ie
): ?>
71.
background-image: -ms-<?=
$rd
?>
72.
-ms-animation-name: spin;
73.
-ms-animation-duration: 3s;
74.
-ms-animation-iteration-
count
: infinite;
75.
-ms-animation-timing-
function
: linear;
76.
<?php
endif
;?>"
77.
></div>
78.
<?php
if
(
$no_rq
):?>
79.
</body>
80.
</html>
81.
<?php
endif
;?>