• Raphael.js API之Element.id,Element.insertAfter(),Element.insertBefore(),Element.hide(),Paper.clear(),


    /*API-21*/
    Element.id
    number类型
    元素的唯一id,在你想监听某个元素的时候很有用,因为所有元素都给定格式 <module>.<action>.<id>. 对Paper.getById方法也很有用
    /*API-22*/
    Element.insertAfter()
    将当前对象插入到给定元素的后面
    /*API-23*/
    Element.insertBefore()
    将当前对象插入到给定元素的前面
    /*API-19*/
    Element.hide()
    是元素不可见
    /*API-20*/
    Element.hover(f_in,f_out,[icontext],[ocontext]);
    为悬浮元素添加添加处理事件
    参数列表:
    f_in    
        function
        当悬浮到给定元素上执行的操作
    f_out
        function
        当离开给定元素时执行的操作
    icontext
        可选参数
        Object类型
        悬浮辅助操作
    ocontext
        可选参数
        Object类型
        离开时辅助操作
    返回值:元素对象
    /*API-84*/
    Paper.clear()
    清空画布,删除画布中所有元素
    /*API-88*/
    Paper.getById(id)
    返回元素的内置id
    参数列表:
    id
        number类型
        id
    返回Raphael对象
  • 相关阅读:
    博客园代码
    前端
    1338. Reduce Array Size to The Half
    1220. Count Vowels Permutation
    363. Max Sum of Rectangle No Larger Than K
    366. Find Leaves of Binary Tree
    443. String Compression
    8 · Rotate String
    886. Possible Bipartition
    LT 183 wood cut
  • 原文地址:https://www.cnblogs.com/MedivhQ/p/4074932.html
Copyright © 2020-2023  润新知