[go: up one dir, main page]

CN103019516B - For the method and apparatus showing the page - Google Patents

For the method and apparatus showing the page Download PDF

Info

Publication number
CN103019516B
CN103019516B CN201210530625.XA CN201210530625A CN103019516B CN 103019516 B CN103019516 B CN 103019516B CN 201210530625 A CN201210530625 A CN 201210530625A CN 103019516 B CN103019516 B CN 103019516B
Authority
CN
China
Prior art keywords
layer
page
predetermined position
range
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210530625.XA
Other languages
Chinese (zh)
Other versions
CN103019516A (en
Inventor
曾轶
王海
黄欢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing World Star Technology Co Ltd
Original Assignee
Beijing World Star Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing World Star Technology Co Ltd filed Critical Beijing World Star Technology Co Ltd
Priority to CN201210530625.XA priority Critical patent/CN103019516B/en
Publication of CN103019516A publication Critical patent/CN103019516A/en
Application granted granted Critical
Publication of CN103019516B publication Critical patent/CN103019516B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

本发明公开了一种用于显示页面的方法和设备,其中页面包括第一图层和与第一图层相关联的第二图层,且第二图层隐藏显示,设备包括:检测模块,用于检测用户在页面上的操作位置;以及第二图层呈现模块,在接收到所述检测模块发送的触发消息之后,适于:逐步改变所述第二图层的位置,直到所述第二图层的位置达到所述第一图层范围内的第一预定位置为止;使第二图层停止移动达第一预定时间;以及将所述第二图层的位置从所述第一预定位置设置为所述第一图层之上的第二预定位置;隐藏模块,用于当用户在页面上的操作离开所述第一图层时,隐藏所述第二图层。降低第二图层在第一图层上的叠加显示过程的跳跃性,从而改善用户的视觉体验。

The invention discloses a method and device for displaying a page, wherein the page includes a first layer and a second layer associated with the first layer, and the second layer is hidden and displayed, and the device includes: a detection module, It is used to detect the user’s operation position on the page; and the second layer presentation module, after receiving the trigger message sent by the detection module, is adapted to: gradually change the position of the second layer until the second layer Until the position of the second layer reaches a first predetermined position within the range of the first layer; making the second layer stop moving for a first predetermined time; and changing the position of the second layer from the first predetermined time The position is set as a second predetermined position above the first layer; a hiding module is configured to hide the second layer when the user's operation on the page leaves the first layer. The jumpiness of the superimposed display process of the second layer on the first layer is reduced, thereby improving the user's visual experience.

Description

用于显示页面的方法和设备Method and device for displaying pages

技术领域technical field

本发明涉及计算机技术领域,具体涉及一种用于显示页面的方法和设备。The present invention relates to the field of computer technology, in particular to a method and device for displaying pages.

背景技术Background technique

图层提供了一种对页面对象进行有效控制的手段,图层可以包括文本、图片、表格、插件,也可以在图层里面嵌套其他图层。在HTML(HypertextMarkupLanguage,超文本标记语言)文档的正文部分可以放置的元素都可以放入图层内。由于图层可以放置在页面的任何位置,从而能有效控制页面中的对象。Layers provide a means to effectively control page objects. Layers can include text, pictures, tables, plug-ins, and other layers can be nested in layers. All elements that can be placed in the body of an HTML (HypertextMarkupLanguage, Hypertext Markup Language) document can be placed in the layer. Because the layer can be placed anywhere on the page, it can effectively control the objects on the page.

在现有技术中可通过控制图层的显示或隐藏,以实现页面交互技术,但由于在现有技术中图层从隐藏至完全显示的过程视觉跳跃性较强,影响用户体验。In the prior art, the page interaction technology can be realized by controlling the display or hiding of the layer, but in the prior art, the process of the layer from hiding to fully displaying has a strong visual jump, which affects the user experience.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的用于显示页面的方法和设备。In view of the above problems, the present invention is proposed to provide a method and device for displaying pages that overcome the above problems or at least partially solve the above problems.

依据本发明的一个方面,提供了一种用于显示页面的方法,页面包括第一图层和与第一图层相关联的第二图层,且第二图层隐藏显示,方法包括以下步骤:检测用户在页面上的操作位置,当操作位置从第一图层的范围之外进入第一图层的范围之内时,触发在第一图层之上叠加显示第二图层;逐步改变第二图层的位置,直到第二图层的位置达到第一图层范围内的第一预定位置为止;使第二图层停止移动达第一预定时间;以及将第二图层的位置从第一预定位置设置为第一图层之上的第二预定位置;其中,在将第二图层从第一预定位置移动至第一图层之上的第二预定位置的步骤之后,方法还包括:当用户在页面上的操作离开第一图层时,隐藏第二图层。According to one aspect of the present invention, a method for displaying a page is provided, the page includes a first layer and a second layer associated with the first layer, and the second layer is hidden and displayed, the method includes the following steps : Detect the user's operation position on the page. When the operation position enters the range of the first layer from outside the range of the first layer, trigger the superimposed display of the second layer on top of the first layer; gradually change the position of the second layer until the position of the second layer reaches a first predetermined position within the range of the first layer; stop the movement of the second layer for a first predetermined time; and change the position of the second layer from The first predetermined position is set as a second predetermined position above the first layer; wherein, after the step of moving the second layer from the first predetermined position to the second predetermined position above the first layer, the method further Including: hide the second layer when the user's operation on the page leaves the first layer.

可选地,第二图层处于位于第一图层的底部的不可见区域中来隐藏显示。Optionally, the second layer is displayed hidden in an invisible area located at the bottom of the first layer.

可选地,用户在页面上的操作位置从第一图层的范围之外进入第一图层的范围之内通过将光标滑动到第一图层上和/或点击第一图层来实现。Optionally, the user's operation position on the page is realized by sliding the cursor onto the first layer and/or clicking the first layer from outside the range of the first layer to within the range of the first layer.

可选地,第一预定位置和第二预定位置分别位于第一图层上的两个不同的位置。Optionally, the first predetermined position and the second predetermined position are respectively located at two different positions on the first layer.

根据本发明的另一个方面,提供了一种用于显示页面的设备,页面包括第一图层和与第一图层相关联的第二图层,而且第二图层隐藏显示,设备包括:检测模块,用于检测用户在页面上的操作位置,当操作位置从第一图层的范围之外进入第一图层的范围之内时,发送触发在第一图层之上叠加显示第二图层的消息;以及第二图层呈现模块,在接收到检测模块发送的触发消息之后,适于逐步改变第二图层的位置,直到第二图层的位置达到第一图层范围内的第一预定位置为止,使第二图层停止移动达第一预定时间,以及将第二图层的位置从第一预定位置设置为第一图层之上的第二预定位置;隐藏模块,用于当用户在页面上的操作离开所述第一图层时,隐藏所述第二图层。According to another aspect of the present invention, a device for displaying a page is provided, the page includes a first layer and a second layer associated with the first layer, and the second layer is hidden and displayed, and the device includes: The detection module is used to detect the user's operation position on the page. When the operation position enters the range of the first layer from outside the range of the first layer, a trigger is sent to overlay and display the second layer on top of the first layer. layer message; and the second layer presentation module, after receiving the trigger message sent by the detection module, is adapted to gradually change the position of the second layer until the position of the second layer reaches the range of the first layer Up to the first predetermined position, the second layer is stopped to move for the first predetermined time, and the position of the second layer is set to the second predetermined position above the first layer from the first predetermined position; the hidden module uses The second layer is hidden when the user's operation on the page leaves the first layer.

根据本发明的用于显示页面的方法和设备,首先逐步改变第二图层的位置,然后当第二图层的位置达到第一图层范围内的第一预定位置时,使第二图层停止移动达第一预定时间,最后将第二图层的位置从第一预定位置设置为第一图层之上的第二预定位置,通过增加叠加显示中的中间过度过程,即当第二图层的位置达到第一图层范围内的第一预定位置时,使第二图层停止移动达第一预定时间,由此降低第二图层在第一图层上的叠加显示过程的跳跃性,从而改善用户的视觉体验。According to the method and device for displaying pages of the present invention, the position of the second layer is first gradually changed, and then when the position of the second layer reaches the first predetermined position within the range of the first layer, the second layer is Stop moving for a first predetermined time, and finally set the position of the second layer from the first predetermined position to a second predetermined position above the first layer, by increasing the intermediate transition process in the superimposed display, that is, when the second image When the position of the layer reaches the first predetermined position within the range of the first layer, the second layer stops moving for the first predetermined time, thereby reducing the jumpiness of the superimposed display process of the second layer on the first layer , thereby improving the user's visual experience.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:

图1示出了根据本发明一个实施例的用于显示页面的方法的流程图;以及FIG. 1 shows a flowchart of a method for displaying a page according to an embodiment of the present invention; and

图2示出了根据本发明一个实施例的用于显示页面的设备的框图。Fig. 2 shows a block diagram of a device for displaying pages according to an embodiment of the present invention.

具体实施方式detailed description

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

随着互联网应用的快速发展,一些页面交互的技术也在不断进步,越来越多的页面交互采用诸如CSS(CascadingStyleSheet,级联样式表),Javascript代码等技术,以实现在网页上呈现具有吸引力的界面。With the rapid development of Internet applications, some page interaction technologies are also constantly improving. More and more page interactions use technologies such as CSS (CascadingStyleSheet, cascading style sheets), Javascript codes, etc., to achieve attractive presentation on web pages. force interface.

在现有的利用图层进行页面交互的设计中,首先在页面的界面上显示第一图层,并且在第一图层中可显示某个产品的图片,当用户滑动鼠标到该第一图层中时,会在第一图层上叠加显示第二图层,并且在第二图层中显示对第一图层中的产品进一步描述的内容。然而,在上述图层叠加方式中,通常是在触发叠加事件后,马上在第一图层上叠加显示第二图层。由于在叠加显示第二图层的过程中缺乏中间过渡过程,导致叠加显示第二图层的视觉跳跃性较强,影响了用户体验。In the existing design of using layers for page interaction, the first layer is firstly displayed on the interface of the page, and a picture of a certain product can be displayed in the first layer. When the user slides the mouse to the first picture When in the first layer, the second layer will be superimposed on the first layer, and the content that further describes the products in the first layer will be displayed in the second layer. However, in the above layer overlay method, usually after the overlay event is triggered, the second layer is overlaid and displayed on the first layer immediately. Due to the lack of an intermediate transition process in the process of superimposing and displaying the second layer, the visual jump of the superimposed display of the second layer is strong, which affects user experience.

为此,本发明提出了一种用于显示页面的方法和设备。本发明提出的用于显示页面的方法主要是,在第一图层之上叠加显示第二图层时,首先逐步改变第二图层的位置,然后当第二图层的位置达到第一图层范围内的第一预定位置时,使第二图层停止移动达第一预定时间,最后再将第二图层的位置从第一预定位置设置为第一图层之上的第二预定位置,从而实现第二图层以平滑的方式叠加显示在第一图层上,由此减少第二图层在第一图层上叠加显示过程中的跳跃性,改善用户的视觉体验。下面结合图1具体说明根据本发明一个实施例的、适于解决上述问题的用于显示页面的方法100的流程图。To this end, the present invention proposes a method and device for displaying pages. The method for displaying pages proposed by the present invention is mainly to change the position of the second layer gradually when the second layer is superimposed on the first layer, and then when the position of the second layer reaches the position of the first image When the first predetermined position within the layer range, stop the movement of the second layer for the first predetermined time, and finally set the position of the second layer from the first predetermined position to the second predetermined position above the first layer , so that the second layer can be superimposed and displayed on the first layer in a smooth manner, thereby reducing jumping during the superimposed display process of the second layer on the first layer, and improving the user's visual experience. A flow chart of a method 100 for displaying a page according to an embodiment of the present invention and suitable for solving the above-mentioned problems will be described in detail below with reference to FIG. 1 .

如图1所示,本发明的实施例的用于显示页面的方法100始于步骤S110,在步骤S110中,设置第一图层以及与第一图层相关联的第二图层。As shown in FIG. 1 , the method 100 for displaying a page according to the embodiment of the present invention starts at step S110, and in step S110, a first layer and a second layer associated with the first layer are set.

可选地,在以HTML格式编写的页面上设置第一图层和与第一图层相关联的第二图层,第一图层和第二图层中可以包括文本、图片、表格、插件中的任意一个或多个。上述相关联可以是指第一图层中的文本、图片、表格或者插件与第二图层中的文本、图片、表格或插件相关联,例如第二图层中的图片所显示的内容是对第一图层中的图片所显示内容的进一步解释说明。Optionally, set the first layer and the second layer associated with the first layer on the page written in HTML format, the first layer and the second layer can include text, pictures, tables, plug-ins Any one or more of the . The above-mentioned association may mean that the text, picture, table or plug-in in the first layer is associated with the text, picture, table or plug-in in the second layer, for example, the content displayed by the picture in the second layer is the Further explanation of what the picture in the first layer shows.

根据本发明的一个实施例,第一图层和第二图层为CSS图层,即第一图层和第二图层可以用HTML中的CSS代码来实现。例如第一图层和第二图层的CSS代码如下:According to an embodiment of the present invention, the first layer and the second layer are CSS layers, that is, the first layer and the second layer can be implemented with CSS codes in HTML. For example, the CSS codes of the first layer and the second layer are as follows:

(1)第一图层(layer_A)的初始CSS代码为:(1) The initial CSS code of the first layer (layer_A) is:

#layer_A{display:inline-block;float:left;height:164px;margin-right:27px;overflow:hidden;position:relative;width:226px;}#layer_A{display:inline-block; float:left; height:164px;margin-right:27px;overflow:hidden;position:relative;width:226px;}

其中,layer_A的CSS样式属性包括:display(显示):inline-block(对象呈递为内联对象,但是对象的内容作为块对象呈递)、float(浮动):left(左浮动)、height(高度):164px(高度164px)、margin-right(右边缘):27px(距离右边27px)、overflow(溢出):hidden(隐藏溢出)、position(位置):relative(相对定位)、width(宽度):226px(宽度226px)。通过第一图层(layer_A)的四个CSS样式属性height、width、overflow和position,为第二图层(layer_B)构造了一个封闭的、相对定位的父元素,该父元素为第一图层(layer_A),子元素为第二图层(layer_B)。Among them, the CSS style attributes of layer_A include: display (display): inline-block (the object is rendered as an inline object, but the content of the object is rendered as a block object), float (floating): left (floating left), height (height) : 164px (height 164px), margin-right (right edge): 27px (27px from the right), overflow (overflow): hidden (hidden overflow), position (position): relative (relative positioning), width (width): 226px (width 226px). Through the four CSS style attributes height, width, overflow and position of the first layer (layer_A), a closed and relatively positioned parent element is constructed for the second layer (layer_B), which is the first layer (layer_A), the child element is the second layer (layer_B).

(2)第二图层(layer_B)的初始CSS代码为:(2) The initial CSS code of the second layer (layer_B) is:

#layer_B{display:block;height:136px;left:14px;position:absolute;top:178px;width:198px;z-index:100;}#layer_B{display:block;height:136px;left:14px;position:absolute;top:178px;width:198px;z-index:100;}

其中,第二图层(layer_B)的CSS样式属性包括:display(显示):block(块对象);height(高度):136px(高度136px);left(左边距):14px(距离左边14px);position(位置):absolute(绝对定位);top(顶边距):178px(距离顶部178px);width(宽度):198px(宽度198px);z-index(z轴方向高度):100(z-index属性值100)。Among them, the CSS style properties of the second layer (layer_B) include: display (display): block (block object); height (height): 136px (height 136px); left (left margin): 14px (14px from the left); position (position): absolute (absolute positioning); top (top margin): 178px (178px from the top); width (width): 198px (width 198px); z-index (z-axis height): 100 (z- index attribute value 100).

第二图层(layer_B)的position设为绝对定位(absolute),而且第二图层(layer_B)的top的值比第一图层(layer_A)的height的值更大,使得第二图层(layer_B)绝对定位在第一图层(layer_A)中底部的不可见区域。The position of the second layer (layer_B) is set to absolute positioning (absolute), and the value of top of the second layer (layer_B) is larger than the value of height of the first layer (layer_A), so that the second layer ( layer_B) absolutely positioned in the bottom invisible area in the first layer (layer_A).

根据本发明的一个实施例,第二图层是第一图层的一个子元素,当第二图层和第一图层不发生叠加时,显示第一图层。当发生叠加时,第二图层将叠加在第一图层上,此时第一图层和第二图层可展示为两个点击按钮,用户通过点击第一图层和第二图层可分别链接到不同的网址。下面介绍第一图层(layer_A)和第二图层(layer_B)设置在页面中的HTML代码:According to an embodiment of the present invention, the second layer is a child element of the first layer, and when the second layer and the first layer do not overlap, the first layer is displayed. When superposition occurs, the second layer will be superimposed on the first layer. At this time, the first layer and the second layer can be displayed as two click buttons, and the user can click the first layer and the second layer to each link to a different URL. The following introduces the HTML code for setting the first layer (layer_A) and the second layer (layer_B) in the page:

随后,在步骤S120中,隐藏第二图层。可选地,可通过如下设置来实现隐藏显示第二图层:将第二图层处于位于第一图层的底部的不可见区域中。Subsequently, in step S120, the second layer is hidden. Optionally, the second layer may be hidden and displayed through the following settings: placing the second layer in an invisible area at the bottom of the first layer.

当第一图层和第二图层为CSS图层时,在步骤S120中将第二图层绝对定位在第一图层中底部的不可见区域中。隐藏第二图层的CSS代码可参见上述介绍第二图层的初始CSS代码的部分。When the first layer and the second layer are CSS layers, in step S120, the second layer is absolutely positioned in the invisible area at the bottom of the first layer. For the CSS code of hiding the second layer, please refer to the above-mentioned part introducing the initial CSS code of the second layer.

随后,在步骤S130中,检测用户在页面上的操作位置,当操作位置从第一图层的范围之外进入第一图层的范围之内时,触发在第一图层之上叠加显示第二图层。Subsequently, in step S130, the user's operation position on the page is detected, and when the operation position enters the range of the first layer from outside the range of the first layer, triggering the overlay display of the first layer on the first layer Second layer.

可选地,用户在页面上的操作位置从第一图层的范围之外进入第一图层的范围之内可通过将光标滑动到第一图层上和/或点击第一图层来实现。Optionally, the user's operation position on the page can be realized by sliding the cursor onto the first layer and/or clicking on the first layer from outside the range of the first layer to within the range of the first layer .

也就是,在第一图层上绑定鼠标进入的事件:onmouseenter。当鼠标进入第一图层时,触发在第一图层之上叠加显示第二图层。在第一图层上绑定鼠标进入的事件的代码示例如下:That is, bind the mouse entry event on the first layer: onmouseenter. When the mouse enters the first layer, trigger to display the second layer superimposed on the first layer. The code example of binding the mouse entry event on the first layer is as follows:

随后,在步骤S140中,逐步改变第二图层的位置,直到第二图层的位置达到第一图层范围内的第一预定位置为止。Subsequently, in step S140, the position of the second layer is gradually changed until the position of the second layer reaches a first predetermined position within the range of the first layer.

可选地,第二图层平滑叠加在第一图层上,直到第二图层的位置达到第一图层范围内的第一预定位置为止,该第一预定位置可以是第二图层的顶部距离第一图层的顶部为预定距离时的位置。例如可使用开源Javascript框架——JQuery中的动画函数animate来实现逐步改变第二图层的位置,该函数的说明如下:Optionally, the second layer is smoothly superimposed on the first layer until the position of the second layer reaches a first predetermined position within the range of the first layer, and the first predetermined position may be an Top is the predetermined distance from the top of the first layer. For example, you can use the animation function animate in JQuery, an open source Javascript framework, to gradually change the position of the second layer. The description of this function is as follows:

函数:function:

animate(properties,[duration],[easing],[callback])animate(properties,[duration],[easing],[callback])

参数:parameter:

Properties:一组CSS样式属性,动画将按照上述属性移动。Properties: A set of CSS style properties, the animation will move according to the above properties.

Duration:一个字符串或者数字决定动画将运行多久。Duration: A string or number that determines how long the animation will run.

Easing:要使用的擦除效果的名称,默认jQuery提供"linear"和"swing"。Easing: The name of the erasing effect to use, by default jQuery provides "linear" and "swing".

Callback(回调函数):在动画完成时执行的函数。Callback (callback function): The function that is executed when the animation completes.

通过animate函数,第二图层的CSS样式属性top的取值从初始值平滑地减少至预定距离值(例如10px,即10像素),也就是第二图层平滑的移动到离第一图层的顶部相差10px的第一预定位置时,会执行下述的步骤S150。当然可以理解的是,在本发明的实施例中并不限定上述预定距离值的具体取值范围。实现步骤S140的代码如下:Through the animate function, the value of the CSS style property top of the second layer is smoothly reduced from the initial value to a predetermined distance value (for example, 10px, that is, 10 pixels), that is, the second layer moves smoothly to the distance from the first layer When the first predetermined position differs by 10px from the top of , the following step S150 will be executed. Of course, it can be understood that, in the embodiment of the present invention, the specific value range of the foregoing predetermined distance value is not limited. The code for realizing step S140 is as follows:

随后,在步骤S150中,使第二图层停止移动达到第一预定时间。随后,在步骤S160中,将第二图层的位置从第一预定位置设置为第一图层之上的第二预定位置。可选地,第一预定位置和第二预定位置分别位于第一图层上的两个不同的位置。Subsequently, in step S150, the movement of the second layer is stopped for a first predetermined time. Subsequently, in step S160, the position of the second layer is set from the first predetermined position to a second predetermined position above the first layer. Optionally, the first predetermined position and the second predetermined position are respectively located at two different positions on the first layer.

根据本发明的一个实施例,可采用下列方式将第二图层的位置从第一预定位置设置为第一图层之上的第二预定位置,以实现第二图层以跳跃的方式达到第一图层之上的第二预定位置。即,设置第二图层的CSS样式属性,使第二图层的位置属性被设置为第二预定位置。According to an embodiment of the present invention, the position of the second layer can be set from the first predetermined position to the second predetermined position above the first layer in the following manner, so as to realize that the second layer reaches the first layer by jumping A second predetermined position above a layer. That is, the CSS style property of the second layer is set so that the position property of the second layer is set to the second predetermined position.

具体到上述步骤中,在步骤S150中,当第二图层平滑地到达距离第一图层顶部10px处的第一预定位置后,停止移动第二图层第一预定时间(例如50毫秒),然后在步骤S160中设置第二图层的CSS样式属性,使得第二图层以跳跃的方式“瞬间”到达第二预定位置,代码示例如下:Specifically in the above steps, in step S150, when the second layer smoothly reaches the first predetermined position 10px from the top of the first layer, stop moving the second layer for the first predetermined time (for example, 50 milliseconds), Then set the CSS style attribute of the second layer in step S160, so that the second layer "instantly" reaches the second predetermined position in a jumping manner, the code example is as follows:

在步骤S160之后,整个方法可以直接结束。但为了增强用户体验的效果,使得用户操作完成后,可以隐藏第二图层,可以在步骤S160之后再执行步骤S170。After step S160, the whole method can end directly. However, in order to enhance the effect of user experience so that the second layer can be hidden after the user operation is completed, step S170 can be performed after step S160.

在步骤S170中,当用户在页面上的操作离开第一图层时,隐藏第二图层。In step S170, when the user's operation on the page leaves the first layer, the second layer is hidden.

具体地,通过设置第二图层的CSS样式属性,使第二图层处于第一图层下方的不可见区域。例如鼠标离开第一图层时,将会重置第一图层和第二图层的CSS样式属性,重新隐藏第二图层。例如,使用JQuery的函数animate,将第二图层(layer_B)的CSS样式属性top从0渐变至178px,从而能够实现隐藏第二图层(layer_B)的目的。实现隐藏第二图层的CSS代码如下:Specifically, by setting the CSS style property of the second layer, the second layer is placed in an invisible area below the first layer. For example, when the mouse leaves the first layer, the CSS style properties of the first layer and the second layer will be reset, and the second layer will be hidden again. For example, use the function animate of JQuery to gradually change the CSS style property top of the second layer (layer_B) from 0 to 178px, so as to realize the purpose of hiding the second layer (layer_B). The CSS code to hide the second layer is as follows:

需要说明的是,图1所示的方法并不限定按所示的各步骤的顺序进行,可以根据需要调整各步骤的先后顺序,另外,所述步骤也不限定于上述步骤划分,上述步骤可以进一步拆分成更多步骤也可以合并成更少步骤,例如将步骤S110拆分为两个步骤,也可以讲步骤S110与步骤S120合并。It should be noted that the method shown in Figure 1 is not limited to the order of the steps shown, and the order of the steps can be adjusted as needed. In addition, the steps are not limited to the division of the above steps, and the above steps can be Further splitting into more steps can also be combined into fewer steps, for example, step S110 is split into two steps, or step S110 can be combined with step S120.

下面结合图2说明根据本发明一个实施例的、适于解决上述问题的一种用于显示页面的设备200。A device 200 for displaying pages according to an embodiment of the present invention and adapted to solve the above problems will be described below with reference to FIG. 2 .

如图2所示,本发明的实施例中用于显示页面的设备200包括:检测模块210和第二图层呈现模块220。为了说明方便起见,图2中还示出了页面20、以及在页面20中的第一图层201和与第一图层201相关联的第二图层203,且第二图层203隐藏显示。可选地,第二图层203处于位于第一图层201的底部的不可见区域中来隐藏显示。As shown in FIG. 2 , the device 200 for displaying pages in the embodiment of the present invention includes: a detection module 210 and a second layer presentation module 220 . For the sake of illustration convenience, the page 20, the first layer 201 in the page 20 and the second layer 203 associated with the first layer 201 are also shown in FIG. 2, and the second layer 203 is hidden and displayed . Optionally, the second layer 203 is hidden in an invisible area located at the bottom of the first layer 201 .

可选地,第一图层和第二图层为CSS图层,即第一图层和第二图层可以用HTML中的CSS代码来实现。例如第一图层和第二图层的CSS代码如下:Optionally, the first layer and the second layer are CSS layers, that is, the first layer and the second layer can be implemented with CSS codes in HTML. For example, the CSS codes of the first layer and the second layer are as follows:

(1)第一图层(layer_A)的初始CSS代码为:(1) The initial CSS code of the first layer (layer_A) is:

#layer_A{display:inline-block;float:left;height:164px;margin-right:27px;overflow:hidden;position:relative;width:226px;}#layer_A{display:inline-block;float:left;height:164px;margin-right:27px;overflow:hidden;position:relative;width:226px;}

其中,layer_A的CSS样式属性包括:display(显示):inline-block(对象呈递为内联对象,但是对象的内容作为块对象呈递)、float(浮动):left(左浮动)、height(高度):164px(高度164px)、margin-right(右边缘):27px(距离右边27px)、overflow(溢出):hidden(隐藏溢出)、position(位置):relative(相对定位)、width(宽度):226px(宽度226px)。通过第一图层(layer_A)的四个CSS样式属性height、width、overflow和position,为第二图层(layer_B)构造了一个封闭的、相对定位的父元素,该父元素为第一图层(layer_A),子元素为第二图层(layer_B)。Among them, the CSS style attributes of layer_A include: display (display): inline-block (the object is rendered as an inline object, but the content of the object is rendered as a block object), float (floating): left (floating left), height (height) : 164px (height 164px), margin-right (right edge): 27px (27px from the right), overflow (overflow): hidden (hidden overflow), position (position): relative (relative positioning), width (width): 226px (width 226px). Through the four CSS style attributes height, width, overflow and position of the first layer (layer_A), a closed and relatively positioned parent element is constructed for the second layer (layer_B), which is the first layer (layer_A), the child element is the second layer (layer_B).

(2)第二图层(layer_B)的初始CSS代码为:(2) The initial CSS code of the second layer (layer_B) is:

#layer_B{display:block;height:136px;left:14px;position:absolute;top:178px;width:198px;z-index:100;}#layer_B{display:block;height:136px;left:14px;position:absolute;top:178px;width:198px;z-index:100;}

其中,第二图层(layer_B)的CSS样式属性包括:display(显示):block(块对象);height(高度):136px(高度136px);left(左边距):14px(距离左边14px);position(位置):absolute(绝对定位);top(顶边距):178px(距离顶部178px);width(宽度):198px(宽度198px);z-index(z轴方向高度):100(z-index属性值100)。Among them, the CSS style properties of the second layer (layer_B) include: display (display): block (block object); height (height): 136px (height 136px); left (left margin): 14px (14px from the left); position (position): absolute (absolute positioning); top (top margin): 178px (178px from the top); width (width): 198px (width 198px); z-index (z-axis height): 100 (z- index attribute value 100).

第二图层(layer_B)的position设为绝对定位(absolute),而且第二图层(layer_B)的top的值比第一图层(layer_A)的height的值更大,使得第二图层(layer_B)绝对定位在第一图层(layer_A)中底部的不可见区域。The position of the second layer (layer_B) is set to absolute positioning (absolute), and the value of top of the second layer (layer_B) is larger than the value of height of the first layer (layer_A), so that the second layer ( layer_B) absolutely positioned in the bottom invisible area in the first layer (layer_A).

检测模块210检测用户在页面20上的操作位置,当操作位置从第一图层201的范围之外进入第一图层201的范围之内时,发送触发在第一图层201之上叠加显示第二图层203的消息。The detection module 210 detects the user's operation position on the page 20, and when the operation position enters the range of the first layer 201 from outside the range of the first layer 201, a trigger is sent to overlay display on the first layer 201 The message of the second layer 203 .

可选地,检测模块210通过检测光标是否滑动到第一图层201上和/或点击第一图层201来判断用户在页面20上的操作位置是否从第一图层201的范围之外进入第一图层201的范围之内。例如:在第一图层201上绑定鼠标进入的事件:onmouseenter。当检测模块210检测到鼠标的光标滑动到第一图层201上和/或第一图层201附近时,发送触发在第一图层201之上叠加显示第二图层203的消息。在第一图层201上绑定鼠标进入的事件的代码示例如下:Optionally, the detection module 210 determines whether the user's operation position on the page 20 enters from outside the range of the first layer 201 by detecting whether the cursor slides onto the first layer 201 and/or clicks on the first layer 201 within the scope of the first layer 201. For example: on the first layer 201, bind the event of mouse entry: onmouseenter. When the detection module 210 detects that the cursor of the mouse slides on and/or near the first layer 201 , it sends a message triggering the overlay display of the second layer 203 on the first layer 201 . A code example of binding a mouse entry event on the first layer 201 is as follows:

第二图层呈现模块220在接收到检测模块210发出的出发消息之后,首先逐步改变第二图层203的位置,直到第二图层203的位置达到第一图层201范围内的第一预定位置为止,随后使第二图层203在第一预定位置停止移动达第一预定时间,以及在第一预定时间之后,将通过第二图层203的位置从第一预定位置设置为第一图层201之上的第二预定位置。After receiving the departure message sent by the detection module 210, the second layer presentation module 220 first gradually changes the position of the second layer 203 until the position of the second layer 203 reaches the first predetermined position within the range of the first layer 201. position, then make the second layer 203 stop moving at the first predetermined position for a first predetermined time, and after the first predetermined time, set the position passing through the second layer 203 from the first predetermined position to the first figure A second predetermined position above layer 201.

可选地,第二图层呈现模块202控制第二图层203平滑叠加在第一图层201上,直到第二图层203的位置达到第一图层201范围内的第一预定位置为止。该第一预定位置可以是第二图层203的顶部距离第一图层201的顶部为预定距离(例如10px,即10像素)时的位置。例如可使用开源Javascript框架——JQuery中的动画函数animate来实现逐步改变第二图层的位置,通过animate函数,第二图层203的CSS样式属性top的取值从初始值平滑地减少至预定距离(例如10px)。当然可以理解的是,在本发明的实施例中并不限定上述预定距离的具体取值范围。Optionally, the second layer presentation module 202 controls the second layer 203 to be smoothly superimposed on the first layer 201 until the position of the second layer 203 reaches a first predetermined position within the range of the first layer 201 . The first predetermined position may be a position when the top of the second layer 203 is a predetermined distance (for example, 10px, ie, 10 pixels) from the top of the first layer 201 . For example, the animation function animate in JQuery, an open source Javascript framework, can be used to gradually change the position of the second layer. Through the animate function, the value of the CSS style attribute top of the second layer 203 is smoothly reduced from the initial value to a predetermined value. distance (eg 10px). Of course, it can be understood that, in the embodiment of the present invention, the specific value range of the foregoing predetermined distance is not limited.

可选地,当第二图层203的顶部离第一图层201的顶部相差10px(第一预定位置)时,第二图层呈现模块202控制停止移动第二图层203第一预定时间(例如50毫秒),然后设置第二图层203的CSS样式属性,使得第二图层203位置属性值被设置为第二预定位置。Optionally, when the top of the second layer 203 is 10px (first predetermined position) away from the top of the first layer 201, the second layer presentation module 202 controls to stop moving the second layer 203 for a first predetermined time ( For example, 50 milliseconds), and then set the CSS style property of the second layer 203, so that the value of the position property of the second layer 203 is set to the second predetermined position.

根据本发明的另一实施例中,为了增强用户体验的效果,使得用户操作完成后,可以隐藏第二图层203,用于显示页面的设备200还包括隐藏模块230,当用户在页面20上的操作离开第一图层201时,隐藏模块230隐藏第二图层203。According to another embodiment of the present invention, in order to enhance the effect of user experience, the second layer 203 can be hidden after the user operation is completed, and the device 200 for displaying the page further includes a hiding module 230. When the user is on the page 20 When the operation leaves the first layer 201, the hiding module 230 hides the second layer 203.

可选地,隐藏模块230通过设置第二图层的CSS样式属性,使第二图层移动至处于第一图层下方的不可见区域。例如鼠标离开第一图层时,将会重置第一图层和第二图层的CSS样式属性,重新隐藏第二图层。例如,使用JQuery的函数animate,将第二图层(layer_B)的CSS样式属性top从0渐变至178px,从而能够实现隐藏第二图层(layer_B)的目的。Optionally, the hiding module 230 moves the second layer to an invisible area below the first layer by setting the CSS style property of the second layer. For example, when the mouse leaves the first layer, the CSS style properties of the first layer and the second layer will be reset, and the second layer will be hidden again. For example, use the function animate of JQuery to gradually change the CSS style property top of the second layer (layer_B) from 0 to 178px, so as to realize the purpose of hiding the second layer (layer_B).

可选地,页面20以HTML格式编写,第二图层203是第一图层201的子元素。例如:第一图层201和第二图层203用HTML中的CSS代码来实现。Optionally, the page 20 is written in HTML format, and the second layer 203 is a child element of the first layer 201 . For example: the first layer 201 and the second layer 203 are implemented with CSS codes in HTML.

根据本发明的另一实施例中,隐藏模块230进一步用于将第二图层203绝对定位在第一图层201中底部的不可见区域中。可选地,隐藏模块230进一步用于通过设置第二图层203的CSS样式属性,使第二图层203处于第一图层201下方的不可见区域。According to another embodiment of the present invention, the hiding module 230 is further used to absolutely position the second layer 203 in the invisible area at the bottom of the first layer 201 . Optionally, the hiding module 230 is further configured to make the second layer 203 an invisible area under the first layer 201 by setting the CSS style attribute of the second layer 203 .

例如鼠标离开第一图层201时,将会重置第一图层201和第二图层203的CSS样式属性,重新隐藏第二图层203。可选地,使用JQuery的函数animate,将第二图层203的CSS样式属性top从0渐变至178px,从而能够实现隐藏第二图层203的目的。For example, when the mouse leaves the first layer 201, the CSS style properties of the first layer 201 and the second layer 203 will be reset, and the second layer 203 will be hidden again. Optionally, the CSS style attribute top of the second layer 203 is gradually changed from 0 to 178px by using the function animate of JQuery, so that the purpose of hiding the second layer 203 can be realized.

根据本发明的用于显示页面的方法和设备,首先逐步改变第二图层的位置,然后当第二图层的位置达到第一图层范围内的第一预定位置时,使第二图层停止移动达第一预定时间,最后将第二图层的位置从第一预定位置设置为第一图层之上的第二预定位置,通过增加叠加显示中的中间过度过程,即当第二图层的位置达到第一图层范围内的第一预定位置时,使第二图层停止移动达第一预定时间,由此降低第二图层在第一图层上的叠加显示过程的跳跃性,从而改善用户的视觉体验。According to the method and device for displaying pages of the present invention, the position of the second layer is first gradually changed, and then when the position of the second layer reaches the first predetermined position within the range of the first layer, the second layer is Stop moving for a first predetermined time, and finally set the position of the second layer from the first predetermined position to a second predetermined position above the first layer, by increasing the intermediate transition process in the superimposed display, that is, when the second image When the position of the layer reaches the first predetermined position within the range of the first layer, the second layer stops moving for the first predetermined time, thereby reducing the jumpiness of the superimposed display process of the second layer on the first layer , thereby improving the user's visual experience.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings), as well as any method or method so disclosed, may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的用于显示页面的设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the device for displaying pages according to the embodiment of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

Claims (18)

1.一种用于显示页面的方法,所述页面包括第一图层和与所述第一图层相关联的第二图层,且所述第二图层隐藏显示,所述方法包括步骤:1. A method for displaying a page, the page comprising a first layer and a second layer associated with the first layer, and the second layer is hidden and displayed, the method comprising steps : 检测用户在页面上的操作位置,当所述操作位置从所述第一图层的范围之外进入所述第一图层的范围之内时,触发在所述第一图层之上叠加显示所述第二图层;Detect the user's operation position on the page, and when the operation position enters the range of the first layer from outside the range of the first layer, trigger an overlay display on the first layer said second layer; 逐步改变所述第二图层的位置,直到所述第二图层的位置达到所述第一图层范围内的第一预定位置为止,其中,所述第一预定位置是第二图层的顶部距离第一图层的顶部为预定距离时的位置;gradually changing the position of the second layer until the position of the second layer reaches a first predetermined position within the range of the first layer, wherein the first predetermined position is the position of the second layer The position at which the top is at a predetermined distance from the top of the first layer; 使所述第二图层停止移动达第一预定时间;以及stopping movement of the second layer for a first predetermined time; and 将所述第二图层的位置从所述第一预定位置设置为所述第一图层之上的第二预定位置;setting the position of the second layer from the first predetermined position to a second predetermined position above the first layer; 其中,在所述将第二图层从所述第一预定位置移动至所述第一图层之上的第二预定位置的步骤之后,所述方法还包括:然后当用户在页面上的操作离开所述第一图层时,隐藏所述第二图层。Wherein, after the step of moving the second layer from the first predetermined position to the second predetermined position above the first layer, the method further includes: then when the user operates on the page When leaving the first layer, the second layer is hidden. 2.根据权利要求1所述的方法,其中,所述第二图层处于位于所述第一图层的底部的不可见区域中来隐藏显示。2. The method of claim 1, wherein the second layer is displayed hidden in an invisible area located at the bottom of the first layer. 3.根据权利要求1所述的方法,其中,所述用户在页面上的操作位置从所述第一图层的范围之外进入所述第一图层的范围之内通过将光标滑动到所述第一图层上和/或点击所述第一图层来实现。3. The method according to claim 1, wherein the user's operation position on the page enters from outside the range of the first layer into the range of the first layer by sliding the cursor to the on and/or clicking on said first layer. 4.根据权利要求1所述的方法,其中,所述第一预定位置和所述第二预定位置分别位于所述第一图层上的两个不同的位置。4. The method according to claim 1, wherein the first predetermined position and the second predetermined position are respectively located at two different positions on the first layer. 5.根据权利要求1-4中任一所述的方法,其中,5. The method according to any one of claims 1-4, wherein, 所述页面以HTML格式编写,所述第二图层是所述第一图层的子元素。The page is written in HTML format, and the second layer is a child element of the first layer. 6.根据权利要求5中所述的方法,其中,6. The method according to claim 5, wherein, 所述第一图层和所述第二图层为级联样式表图层。The first layer and the second layer are cascading style sheet layers. 7.根据权利要求6所述的方法,其中,7. The method of claim 6, wherein, 所述隐藏所述第二图层的步骤包括:将所述第二图层绝对定位在所述第一图层中底部的不可见区域中。The step of hiding the second layer includes: absolutely positioning the second layer in the invisible area at the bottom of the first layer. 8.根据权利要求5所述的方法,其中,所述将所述第二图层的位置从所述第一预定位置设置为所述第一图层之上的第二预定位置的步骤包括:8. The method of claim 5, wherein the step of setting the position of the second layer from the first predetermined position to a second predetermined position above the first layer comprises: 设置所述第二图层的级联样式表样式属性,使所述第二图层的位置属性改变至所述第二预定位置。The cascading style sheet style attribute of the second layer is set, so that the position attribute of the second layer is changed to the second predetermined position. 9.根据权利要求5所述的方法,所述当用户在页面上的操作离开所述第一图层时,隐藏所述第二图层的步骤包括:9. The method according to claim 5, said step of hiding said second layer when the user's operation on the page leaves said first layer comprises: 通过设置所述第二图层的级联样式表样式属性,使所述第二图层处于所述第一图层下方的不可见区域。By setting the cascading style sheet style attribute of the second layer, the second layer is placed in an invisible area below the first layer. 10.一种用于显示页面的设备,所述页面包括第一图层和与所述第一图层相关联的第二图层,而且所述第二图层隐藏显示,所述设备包括:10. A device for displaying a page, the page comprising a first layer and a second layer associated with the first layer, and the second layer is hidden and displayed, the device comprising: 检测模块,用于检测用户在页面上的操作位置,当所述操作位置从所述第一图层的范围之外进入所述第一图层的范围之内时,发送触发在所述第一图层之上叠加显示所述第二图层的消息;以及A detection module, configured to detect the user's operation position on the page, and when the operation position enters the range of the first layer from outside the range of the first layer, send a trigger on the first layer displaying the message of the second layer superimposed on the layer; and 第二图层呈现模块,在接收到所述检测模块发送的触发消息之后,逐步改变所述第二图层的位置,直到所述第二图层的位置达到所述第一图层范围内的第一预定位置为止,其中,所述第一预定位置是第二图层的顶部距离第一图层的顶部为预定距离时的位置;使第二图层停止移动达第一预定时间;以及将所述第二图层的位置从所述第一预定位置设置为所述第一图层之上的第二预定位置;The second layer presentation module, after receiving the trigger message sent by the detection module, gradually changes the position of the second layer until the position of the second layer reaches the range of the first layer. until the first predetermined position, wherein the first predetermined position is the position when the top of the second layer is a predetermined distance from the top of the first layer; the second layer is stopped for a first predetermined time; and the position of the second layer is set from the first predetermined position to a second predetermined position above the first layer; 隐藏模块,用于当用户在页面上的操作离开所述第一图层时,隐藏所述第二图层。A hiding module, configured to hide the second layer when the user's operation on the page leaves the first layer. 11.根据权利要求10所述的设备,其中,所述第二图层处于位于所述第一图层的底部的不可见区域中来隐藏显示。11. The device of claim 10, wherein the second layer is displayed hidden in an invisible area located at the bottom of the first layer. 12.根据权利要求10所述的设备,其中,所述用户在页面上的操作位置从所述第一图层的范围之外进入所述第一图层的范围之内通过将光标滑动到所述第一图层上以及点击所述第一图层来实现。12. The device according to claim 10, wherein the user's operation position on the page enters from outside the range of the first layer into the range of the first layer by sliding the cursor to the on the first layer and click on the first layer. 13.根据权利要求10所述的设备,其中,所述第一预定位置和所述第二预定位置分别位于所述第一图层上的两个不同位置。13. The apparatus according to claim 10, wherein the first predetermined position and the second predetermined position are respectively located at two different positions on the first layer. 14.根据权利要求10-13中任一所述的设备,其中,14. The apparatus according to any one of claims 10-13, wherein, 所述页面以HTML格式编写,所述第二图层是所述第一图层的子元素。The page is written in HTML format, and the second layer is a child element of the first layer. 15.根据权利要求14中所述的设备,其中,15. The apparatus according to claim 14, wherein, 所述第一图层和所述第二图层为级联样式表图层。The first layer and the second layer are cascading style sheet layers. 16.根据权利要求15所述的设备,其中,16. The apparatus of claim 15, wherein, 所述隐藏模块进一步用于将所述第二图层绝对定位在所述第一图层中底部的不可见区域中。The hiding module is further configured to absolutely position the second layer in the bottom invisible area of the first layer. 17.根据权利要求14所述的设备,其中,17. The apparatus of claim 14, wherein, 第二图层呈现模块进一步用于通过设置所述第二图层的级联样式表,使所述第二图层的位置属性改变至所述第二预定位置。The second layer presentation module is further configured to change the position attribute of the second layer to the second predetermined position by setting the cascading style sheet of the second layer. 18.根据权利要求15所述的设备,所述隐藏模块进一步用于通过设置所述第二图层的级联样式表样式属性,使所述第二图层处于所述第一图层下方的不可见区域。18. The device according to claim 15, wherein the hidden module is further configured to make the second layer under the first layer by setting the cascading style sheet style attribute of the second layer invisible area.
CN201210530625.XA 2012-12-10 2012-12-10 For the method and apparatus showing the page Expired - Fee Related CN103019516B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210530625.XA CN103019516B (en) 2012-12-10 2012-12-10 For the method and apparatus showing the page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210530625.XA CN103019516B (en) 2012-12-10 2012-12-10 For the method and apparatus showing the page

Publications (2)

Publication Number Publication Date
CN103019516A CN103019516A (en) 2013-04-03
CN103019516B true CN103019516B (en) 2016-08-03

Family

ID=47968176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210530625.XA Expired - Fee Related CN103019516B (en) 2012-12-10 2012-12-10 For the method and apparatus showing the page

Country Status (1)

Country Link
CN (1) CN103019516B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034410B (en) * 2012-12-10 2016-01-13 北京奇虎科技有限公司 The method and apparatus of page display
CN104978723B (en) * 2014-04-14 2018-04-03 阿里巴巴集团控股有限公司 A kind of image processing method and device
CN104133650A (en) * 2014-07-26 2014-11-05 珠海市君天电子科技有限公司 Acceleration ball display method and display terminal
CN105447041A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Webpage processing method and device
CN104391834A (en) * 2014-12-11 2015-03-04 成都明日星辰科技有限公司 Method for annotating electronic book content
CN104571813B (en) * 2014-12-12 2019-03-29 百度在线网络技术(北京)有限公司 A kind of display methods and device of information
CN106202097B (en) * 2015-05-05 2019-12-03 阿里巴巴集团控股有限公司 Picture display method and device
KR102468120B1 (en) * 2016-01-27 2022-11-22 삼성전자 주식회사 Method and electronic device processing an input using view layers
CN106708356B (en) * 2016-08-31 2019-03-01 腾讯科技(深圳)有限公司 Call tag methods of exhibiting and device
CN106406698A (en) * 2016-09-09 2017-02-15 广州视睿电子科技有限公司 Picture display method and device
CN106648585B (en) * 2016-09-22 2020-10-09 北京小米移动软件有限公司 Method and device for setting transparency of webpage DOM (document object model) element
CN109117211A (en) * 2017-06-22 2019-01-01 合网络技术(北京)有限公司 object control method and device
CN107562852B (en) * 2017-08-28 2020-12-25 网易乐得科技有限公司 Method, medium, device and computing equipment for displaying page in browser
CN108196931A (en) * 2018-01-30 2018-06-22 深圳市富途网络科技有限公司 A kind of floating layer display module and method for display extension information
CN108803968B (en) * 2018-06-29 2019-04-16 掌阅科技股份有限公司 The Multiview linkage method of user's display interface calculates equipment and storage medium
CN110245251A (en) * 2019-06-24 2019-09-17 重庆佳渝测绘有限公司 A kind of comparison display methods of soil situation
CN110908757B (en) * 2019-11-18 2022-01-28 腾讯科技(深圳)有限公司 Method and related device for displaying media content
CN112817501B (en) * 2019-11-18 2024-12-10 腾讯科技(深圳)有限公司 A method for displaying media content and related device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411468A (en) * 2010-09-26 2012-04-11 腾讯科技(深圳)有限公司 Method and device for displaying information by using animation
CN103034410A (en) * 2012-12-10 2013-04-10 北京奇虎科技有限公司 Method and equipment for page display

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6720981B1 (en) * 1999-12-08 2004-04-13 International Business Machines Corporation Method, system and program product for animated web page construction and display

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411468A (en) * 2010-09-26 2012-04-11 腾讯科技(深圳)有限公司 Method and device for displaying information by using animation
CN103034410A (en) * 2012-12-10 2013-04-10 北京奇虎科技有限公司 Method and equipment for page display

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于JQuery的图片动态特效设计与实现;刘伟等;《Computer Era》;20111231(第10期);第24-29页 *

Also Published As

Publication number Publication date
CN103019516A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CN103019516B (en) For the method and apparatus showing the page
CN103034410B (en) The method and apparatus of page display
US9003305B2 (en) Folding and unfolding images in a user interface
US20170169856A1 (en) Video Processing Method and Associated Electronic Device
CN102663056B (en) Method and device for displaying picture elements
US9134789B2 (en) Multi-layer computer application with a transparent portion
JP6133318B2 (en) Cross window animation
CN103034683B (en) Page switching method and device for browser
US20080307308A1 (en) Creating Web Clips
CN103870558B (en) Page rendering method and mask layer creating method
CN105094804A (en) Method and apparatus for adding animation to page
CN105242817B (en) Page elements highlighted method and device in real time
CN104793874B (en) A kind of interface display method and electronic equipment
JP2014534533A5 (en)
JP2013535052A5 (en)
CN102902789B (en) Change display control apparatus and the method for the content of browser window display
CN103631867A (en) Webpage display method and browser
CN105260433A (en) Webpage content collecting method and electronic device
WO2014090187A1 (en) Page processing method and device in browser
WO2012097642A1 (en) Browser-based display method, apparatus and system for highlighting picture hotspot
CN102880391B (en) Change display control apparatus and the method for the content that browser window shows
CN104777960B (en) The method and apparatus for realizing the compound object horse race lamp of sectional triggering
CN106874387B (en) Method for displaying real-time information in self-adaptive HTML (Hypertext markup language) scrolling mode
CN102915378B (en) In webpage, content show state changes method and apparatus
CN105095389A (en) Method and device for displaying search result

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160511

Address after: 100041 room, room 2, building 2, No. 17 West Road, Beijing, Shijingshan District, China

Applicant after: Beijing World Star Technology Co.,Ltd.

Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Applicant before: Qizhi software (Beijing) Co.,Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160803