2016-05-08 5 views
1

私はドラッグ可能な透明にする方法を知りたいです。現在、背景は白です。ここに私のウェブサイトがあります: http://amp.site88.net/どのようにドラッグ可能な透明にするには?

これは私のコードです:

<html lang="en"> 
<head> 
<meta charset="utf-8"> 
<title>jQuery UI Draggable - Default functionality</title> 
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> 
<script src="//code.jquery.com/jquery-1.10.2.js"></script> 
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> 
<link rel="stylesheet" href="/resources/demos/style.css"> 
<style> 
#draggable { width: 150px; height: 150px; padding: 0.5em; } 
</style><style> 
body { 
background-color: lightblue; 
} 
</style> 
<script> 
$("#draggable").css("background-color", "transparent"); 
</script> 
<script> 
$(function() { 
$("#draggable").draggable(); 
}); 
</script> 
</head> 
<body> 

<div id="draggable" class="ui-widget-content"> 
<p>Drag me around</p> 
</div> 


</body> 
</html> 

答えて

0

はちょうどあなたのスタイルブロック編集:

#draggable { width: 150px; height: 150px; padding: 0.5em; background: transparent; } 

をし、それが動作するはずです:)

PSは。境界線を消してテキストだけを残す場合は、border: none;を追加する必要があります。

+0

ありがとうございました – johndoe

+0

心配なし:)歓声! – Smnd

関連する問題