小编Art*_*sov的帖子

已弃用的SMIL SVG动画替换为CSS或Web动画效果(悬停,单击)

按照这个主题:

Firefox 38-40 SMIL问题 - 速度非常慢(从1999年9月22日起在FF版本41中解决)

和这个主题:

意图弃用:SMIL

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)

修订版196823:添加SMIL弃用警告


首先,我需要实现三件事:

1)鼠标悬停效果(最简单)

它怎么样:

<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)

css animation svg smil css-animations

37
推荐指数
1
解决办法
3万
查看次数

Crossbrowser GRAB游标(-moz,-webkit)

我正在尝试自定义游标的行为.现在它的工作方式如下:在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)

在这两种浏览器中,但我在这里读到这是不好的做法.


该代码在这里工作,但我需要使用的结构像这个那个.

这样的东西(这种结构现在不起作用).


编辑1

从这个其他Stack Overflow帖子:

解决方案:

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中不起作用(我希望看到第二个,保留移动图标)


编辑2

更清晰,mousedown/mouseup示例:

案例1 :(仅适用于Chrome)

案例2 :(此处mousedown没有变化)

html javascript css dom cursor

7
推荐指数
1
解决办法
7708
查看次数

JS一键切换(不是两次点击) - 切换元素的默认值

为什么在这里我们需要点击两次(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 javascript css

7
推荐指数
1
解决办法
536
查看次数

SVG 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">

    <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及更早版本(我认为)中不起作用,这可能是此方法的最大缺点." …

html javascript css firefox svg

5
推荐指数
1
解决办法
273
查看次数

从plsql输出/返回CLOB值(指定的无效LOB定位符:ORA-22275)

我已经存储了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)

sql oracle plsql blob clob

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

css ×4

html ×3

javascript ×3

svg ×2

animation ×1

blob ×1

clob ×1

css-animations ×1

cursor ×1

dom ×1

firefox ×1

oracle ×1

plsql ×1

smil ×1

sql ×1