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,027

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



 

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

 



Topic : 116207



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



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



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

อันนีสำหรับ chrome ไม่ออกครับ ไม่รู้ผิดตรงไหน
Code (JavaScript)

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
@keyframes spin { 
	from { transform: rotate(0deg); } 
		to { transform: rotate(360deg); } }
@-webkit-keyframes spin { 
	from { -webkit-transform: rotate(0deg); } 
		to { -webkit-transform: rotate(360deg); } }
</style>
</head>
<body>
<div style="z-index: 99; position: fixed; border-radius: 50%; 
	width: 30px; height: 30px; left: 50px; top: 100px;
	radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
	background-image: radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
	animation-name: spin;
	animation-duration: 3s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	background-image: -webkit-radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
	-webkit-animation-name: spin;
	-webkit-animation-duration: 3s;
	-webkit-animation-iteration-count: infinite;
	-webkit-animation-timing-function: linear;
"
></div>
</body>
</html>


ส่วนอันนี้ สำหรับ firefox ออกฉลุยครับ
Code (JavaScript)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
@keyframes spin { 
	from { transform: rotate(0deg); } 
		to { transform: rotate(360deg); } }
@-moz-keyframes spin { 
	from { -moz-transform: rotate(0deg); } 
		to { -moz-transform: rotate(360deg); } }
</style>
</head>
<body>
<div style="z-index: 99; position: fixed; border-radius: 50%; 
	width: 30px; height: 30px; left: 50px; top: 100px;
	radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
	background-image: radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
	animation-name: spin;
	animation-duration: 3s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	background-image: -moz-radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 100%);
	-moz-animation-name: spin;
	-moz-animation-duration: 3s;
	-moz-animation-iteration-count: infinite;
	-moz-animation-timing-function: linear;
"
></div>
</body>
</html>


code php ตัวทำงาน
Code (PHP)
<?php
$r=$_REQUEST;
if( ($no_rq = !isset($r['width'])) ){
	$r=array(
		'width'=>30, 'height'=>30, 
		'left'=>50, 'top'=>100, 
		'RW'=>30, 'RH'=>30,
		'degree'=>45,
		'c1'=>'red', 'c1p'=>0,
		'c2'=>'green', 'c2p'=>100,
		'c3'=>'blue', 'c3p'=>100
	);
}
$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";
//$rd ="radial-gradient( 30px 30px 45deg, circle cover, red 0%, green 100%, blue 95%)";
$ff = preg_match('/Firefox/', $_SERVER['HTTP_USER_AGENT']);
$ch = !$ff && preg_match('/Chrome/', $_SERVER['HTTP_USER_AGENT']);
$ie = !$ff && !$ch;
if($no_rq): 
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<style>
@keyframes spin { 
	from { transform: rotate(0deg); } 
		to { transform: rotate(360deg); } }
<?php if( $ch):?>
@-webkit-keyframes spin { 
	from { -webkit-transform: rotate(0deg); } 
		to { -webkit-transform: rotate(360deg); } }
<?php endif;?>
<?php if( $ff ): ?>
@-moz-keyframes spin { 
	from { -moz-transform: rotate(0deg); } 
		to { -moz-transform: rotate(360deg); } }
<?php endif;?>
<?php if( $ie ): ?>
@-ms-keyframes spin { 
	from { -ms-transform: rotate(0deg); } 
		to { -ms-transform: rotate(360deg); } }
<?php endif;?>
</style>
</head>
<body>
<?php endif; // no_rq
?>
<div style="z-index: 99; position: fixed; border-radius: 50%; 
	width: <?=$r['width']?>px; height: <?=$r['height']?>px; left: <?=$r['left']?>px; top: <?=$r['top']?>px;
	<?=$rd?>
	background-image: <?=$rd?>
	animation-name: spin;
	animation-duration: 3s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
<?php if( $ch):?>
	background-image: -webkit-<?=$rd?>
	-webkit-animation-name: spin;
	-webkit-animation-duration: 3s;
	-webkit-animation-iteration-count: infinite;
	-webkit-animation-timing-function: linear;
<?php endif;?>
<?php if( $ff ): ?>
	background-image: -moz-<?=$rd?>
	-moz-animation-name: spin;
	-moz-animation-duration: 3s;
	-moz-animation-iteration-count: infinite;
	-moz-animation-timing-function: linear;
<?php endif;?>
<?php if( $ie ): ?>
	background-image: -ms-<?=$rd?>
	-ms-animation-name: spin;
	-ms-animation-duration: 3s;
	-ms-animation-iteration-count: infinite;
	-ms-animation-timing-function: linear;
<?php endif;?>"
></div>
<?php if($no_rq):?>
</body>
</html>
<?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 : 719 Reply : 2
 

 

No. 1



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

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

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

มีภาพประกอบไหม๊ครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-05-04 08:36:35 By : mr.win
 


 

No. 2



โพสกระทู้ ( 9,556 )
บทความ ( 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 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

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