Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,038

HOME > PHP > PHP Forum > ช่วยเหลือหน่อยครับ ทำใน firefox ได้ แต่ทำใน chrome ไม่ออกครับ


[PHP] ช่วยเหลือหน่อยครับ ทำใน firefox ได้ แต่ทำใน chrome ไม่ออกครับ

 
Topic : 116207



โพสกระทู้ ( 1,636 )
บทความ ( 0 )



สถานะออฟไลน์
Facebook


ประยุกต์จาก https://www.thaicreate.com/php/forum/092214.html

อันนีสำหรับ chrome ไม่ออกครับ ไม่รู้ผิดตรงไหน
Code (JavaScript)
01.<!doctype html>
02.<html>
03.<head>
04.<meta charset="utf-8">
05.<title>Untitled Document</title>
06.<style>
07.@keyframes spin {
08.    from { transform: rotate(0deg); }
09.        to { transform: rotate(360deg); } }
10.@-webkit-keyframes spin {
11.    from { -webkit-transform: rotate(0deg); }
12.        to { -webkit-transform: rotate(360deg); } }
13.</style>
14.</head>
15.<body>
16.<div style="z-index: 99; position: fixed; border-radius: 50%;
17.    width: 30px; height: 30px; left: 50px; top: 100px;
18.    radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
19.    background-image: radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
20.    animation-name: spin;
21.    animation-duration: 3s;
22.    animation-iteration-count: infinite;
23.    animation-timing-function: linear;
24.    background-image: -webkit-radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
25.    -webkit-animation-name: spin;
26.    -webkit-animation-duration: 3s;
27.    -webkit-animation-iteration-count: infinite;
28.    -webkit-animation-timing-function: linear;
29."
30.></div>
31.</body>
32.</html>


ส่วนอันนี้ สำหรับ firefox ออกฉลุยครับ
Code (JavaScript)
01.<!doctype html>
02.<html>
03.<head>
04.<meta charset="utf-8">
05.<title>Untitled Document</title>
06.<style>
07.@keyframes spin {
08.    from { transform: rotate(0deg); }
09.        to { transform: rotate(360deg); } }
10.@-moz-keyframes spin {
11.    from { -moz-transform: rotate(0deg); }
12.        to { -moz-transform: rotate(360deg); } }
13.</style>
14.</head>
15.<body>
16.<div style="z-index: 99; position: fixed; border-radius: 50%;
17.    width: 30px; height: 30px; left: 50px; top: 100px;
18.    radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
19.    background-image: radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
20.    animation-name: spin;
21.    animation-duration: 3s;
22.    animation-iteration-count: infinite;
23.    animation-timing-function: linear;
24.    background-image: -moz-radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
25.    -moz-animation-name: spin;
26.    -moz-animation-duration: 3s;
27.    -moz-animation-iteration-count: infinite;
28.    -moz-animation-timing-function: linear;
29."
30.></div>
31.</body>
32.</html>


code php ตัวทำงาน
Code (PHP)
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.//$rd ="radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 95%)";
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):
20.?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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; // no_rq
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;?>




Tag : PHP, HTML/CSS



ประวัติการแก้ไข
2015-05-03 16:08:53
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2015-05-03 16:07:05 By : NewbiePHP View : 778 Reply : 2
 

 

No. 1



โพสกระทู้ ( 74,059 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

มีภาพประกอบไหม๊ครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-05-04 08:36:35 By : mr.win
 

 

No. 2



โพสกระทู้ ( 9,590 )
บทความ ( 2 )



สถานะออฟไลน์


24.background-image: -webkit-radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
เอา degree ออก ครับ แก้เป็น
background-image: -webkit-radial-gradient( 30px 30px, circle cover, red 0%, green 100%, blue 100%);


ปล. เฉพาะ -webkit-


ประวัติการแก้ไข
2015-05-04 08:45:30
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-05-04 08:44:50 By : Chaidhanan
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยเหลือหน่อยครับ ทำใน firefox ได้ แต่ทำใน chrome ไม่ออกครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)





Load balance : Server 02
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2025 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่