按照这个主题:
和这个主题:
SVG标记'animateTransform'效果不佳.用CSS或CSS转换替换SMIL(animate标签)会很不错.
CONSOLE WARNING: Please use CSS animations or Web animations instead),
which would work fast on the latest versions of Firefox and Chrome.
Run Code Online (Sandbox Code Playgroud)
下一个Google Chrome警告:
CONSOLE WARNING: SVG's SMIL animations ('animate', 'set', etc.) are deprecated
and will be removed. Please use CSS animations or Web animations instead.
Run Code Online (Sandbox Code Playgroud)
首先,我需要实现三件事:
它怎么样:
<rect x="-0.5" y="-0.5" width="1" height="1" fill="white">
<!--it makes half-visible selecting effect -->
<set attributeName="stroke-opacity" begin="mouseover" end="mouseout" to="0.5"/>
<!-- explicitly reverse the …Run Code Online (Sandbox Code Playgroud) 我正在尝试自定义游标的行为.现在它的工作方式如下:在mousemove上我使用:
scheme.setAttribute("cursor", "move");
Run Code Online (Sandbox Code Playgroud)
onmmouse up:
scheme.setAttribute("cursor", "auto");
Run Code Online (Sandbox Code Playgroud)
在这种情况下:
scheme.setAttribute("cursor", "-moz-grab");
scheme.setAttribute("cursor", "-webkit-grab");
Run Code Online (Sandbox Code Playgroud)
光标仅适用于-webkit(Chrome).
虽然这种情况
scheme.setAttribute("cursor", "-webkit-grab");
scheme.setAttribute("cursor", "-moz-grab");
Run Code Online (Sandbox Code Playgroud)
光标仅适用于-moz(FF).
以下结构没有像我预期的那样工作:
scheme.setAttribute("cursor", "-moz-grab, -webkit-grab");
Run Code Online (Sandbox Code Playgroud)
这有效:
scheme.setAttribute("style", "cursor:-moz-grab; cursor:-webkit-grab;");
Run Code Online (Sandbox Code Playgroud)
在这两种浏览器中,但我在这里读到这是不好的做法.
像这样的东西(这种结构现在不起作用).
解决方案:
scheme.setAttribute("cursor", "url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur) 4 4, move");
Run Code Online (Sandbox Code Playgroud)
适用于两种浏览器,但仍需要使用-moz-grab和-webkit-grab值的解决方案.
它似乎在IE中不起作用(我希望看到第二个,保留移动图标)
更清晰,mousedown/mouseup示例:
案例1 :(仅适用于Chrome)
案例2 :(此处mousedown没有变化)
为什么在这里我们需要点击两次(http://jsfiddle.net/xL8hyoye/4/):
HTML:
<a href="#" onclick="toggle_visibility('foo');">Click here to toggle visibility of element #foo</a>
<div id="foo">This is foo</div>
Run Code Online (Sandbox Code Playgroud)
CSS: #foo {display: none;}
JS:
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}
Run Code Online (Sandbox Code Playgroud)
当这里只有一个单击文本消失(http://jsfiddle.net/xL8hyoye/5/):
HTML:
<a href="#" onclick="toggle_visibility('foo');">Click here to toggle visibility of element #foo</a>
<div id="foo" style='display:none'>This is foo</div> <!-- add display style here -->
Run Code Online (Sandbox Code Playgroud)
CSS: <!-- delete ccs here -->
JS:
function toggle_visibility(id) { …Run Code Online (Sandbox Code Playgroud) 我们有一个简单的代码,可以跨浏览器工作:
<html>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="200" height="100">
<circle id="circ" cx="120" cy="40"
r="30" fill="green"/>
<rect id="rect" x="10" y="10"
width="60" height="60" fill="blue">
<set attributeName="fill-opacity" to="0.5"
begin="circ.mouseover" end="circ.mouseout"/>
</rect>
</svg>
Run Code Online (Sandbox Code Playgroud)
当我尝试使用defs块中的元素时,我在Firefox浏览器中丢失了两个矩形之间的关系.
<html>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="200" height="100">
<defs>
<circle id="circ" cx="120" cy="40"
r="30" fill="green"/>
<rect id="rect" x="10" y="10"
width="60" height="60" fill="blue">
<set attributeName="fill-opacity" to="0.5"
begin="circ.mouseover" end="circ.mouseout"/>
</rect>
</defs>
<use id="use_circ.rectangles" xlink:href="#circ" />
<use id="use_rect.rectangles" xlink:href="#rect" />
</svg>
Run Code Online (Sandbox Code Playgroud)
我在这里阅读了关于关系的内容http://www.petercollingridge.co.uk/data-visualisation/mouseover-effects-svgs? - 实际上这句话
"请注意,这种效果在Firefox Firefox 6及更早版本(我认为)中不起作用,这可能是此方法的最大缺点." …
我已经存储了plsql程序,它从文件中获取大文本
create or replace
procedure dbst_load_a_file( p_file_name in varchar2, l_clob out clob )
as
l_bfile bfile;
dst_offset number := 1 ;
src_offset number := 1 ;
lang_ctx number := DBMS_LOB.DEFAULT_LANG_CTX;
warning number;
begin
l_bfile := bfilename( 'SCHEMES_OF_PS', p_file_name );
dbms_lob.fileopen( l_bfile );
dbms_lob.loadclobfromfile(
DEST_LOB => l_clob
, SRC_BFILE => l_bfile
, AMOUNT => dbms_lob.getlength( l_bfile )
, DEST_OFFSET => dst_offset
, SRC_OFFSET => src_offset
, BFILE_CSID => DBMS_LOB.DEFAULT_CSID
, LANG_CONTEXT => lang_ctx
, WARNING => warning);
dbms_lob.fileclose( l_bfile );
end; …Run Code Online (Sandbox Code Playgroud)