Tag:mouse

  • HTML draggable attribute

    Time:2022-5-5

    draggable This attribute specifies whether the element can be dragged. By default, links and avatars can be dragged event Dragged element ondragstartInstant trigger of dragging ondragContinuous triggering during dragging ondragendDrag end trigger Target element ondragenterTrigger for entering the target element (mouse cursor entry) ondragoverEntering and leaving the target element is triggered continuously ondragleaveTriggered when leaving […]

  • three. JS add 3D model

    Time:2022-4-30

    There are only a few official geometries in three. It is very difficult to generate various models. At this time, it is an option to introduce external models. The specific introduction methods are as follows. Import dependency Click to view the code import * as THREE from “three”; import { OrbitControls } from “three/examples/jsm/controls/OrbitControls”; // […]

  • JavaScript (15) – Events

    Time:2022-4-28

    Event profile Event: it refers to some specific interaction moments in the document or browser window. For web applications, there are the following representative events: clicking on an element, moving the mouse over an element, closing a pop-up window, and so on. JavaScript is based onEvent driven as the coreA language. The interaction between JavaScript […]

  • Example tutorial of making slider with native JS drag function

    Time:2022-4-26

    Drag and drop is a common function of the front end, and the drag and drop function of JS is used for many effects. The core function of the slider is to use js to drag the slider to modify the position. A complete sliding bar includes sliding bar, sliding trace, slider, text and other […]

  • Qt development technology: graphic view framework (II) detailed explanation of scene qgraphicsscene, qgraphicsitem and qgraphicsview

    Time:2022-4-24

    Previous words The three core classes of QT’s graphical view framework are: qgraphicsscene, qgraphicsitem and qgraphicsview. QGraphicsScene describe The qgraphicsscene class provides a face for managing a large number of 2D graphic items. This class is used as a container for qgraphicsitems. Together with qgraphicsview, it is used to visualize graphic items such as lines, […]

  • JavaScript implementation of pop-up drag

    Time:2022-4-22

    Window drag Implementation of window dragging through native JavaScript 1、 Function The drag operation of custom container is realized through JavaScript, and the window is moved by dragging the title part 2、 Realization idea Press the trigger condition with the left mouse button Obtain the distance from the top and left of the mouse down […]

  • Hand in hand to teach you to achieve the spotlight effect

    Time:2022-4-22

    SpotlightIt is a special point light source, which can cast light in one direction. The spotlight casts light similar to a cone, which is consistent with the spotlight we see in reality. Its light is emitted from a point and shines a conical illumination range along a certain direction. A spotlight is similar to a […]

  • JavaScript event handling

    Time:2022-4-17

    JS realizes interface interaction with event driven. The core of event driven: message based and event driven. Generally speaking, events are specific events that occur in a document or browser window Interactive behaviors, such as loading, clicking, input, selection, etc. 1.1 event basis The interaction between JS and html is realized through events. Events are […]

  • React realizes 9 control points of div scaling, rotation and dragging

    Time:2022-4-16

    During this time, the element drag control implemented by a canvas library is very good. So I use js + div to implement one. Use the react framework to practice. thinking Add 8 control points to the four edges and four corners of the controlled element. When dragging a control point, judge the dragging direction […]

  • A humble but very practical function introduction

    Time:2022-4-11

    There are many official examples in thingjs, which are very straightforward and easy to be viewed and used by users, but a very useful function in the development process is very easy to be ignored. Most people just browse these official examples quickly, and sometimes try to develop without browsing them completely. In fact, in […]

  • Anti shake and throttling (jQuery)

    Time:2022-4-10

    Throttling will be triggered continuously, but it will be executed every other period of time, while anti chattering is triggered only at the last time, which is also the last time within the execution interval. 1. Anti shake Write actions intotimerIn, the trigger time is limited. If the action is triggered continuously within the time […]

  • HTML mouse CSS control

    Time:2022-4-9

    Generally speaking, the mouse is displayed with an oblique upward arrow. When it moves to the text, it becomes a vertical line with a head, and when it moves to the hyperlink, it becomes a hand. However, CSS can be used to control the display effect of the mouse. For example, the mouse can be […]