The invention relates to the technical field of webpage content protection, and discloses a webpage
watermark anti-hiding generation method based on a
package protection structure. The method comprises the following steps: firstly, determining an information source after a page is initialized, and generating and caching
watermark image data based on canvas; a
watermark load layer is dynamically created, display and
visibility, transparency, filter, size, positioning, hierarchy, transformation and pointer penetration parameters are solidified by adopting an in-line style, a watermark image is tiled through a background style, and a highest priority mark is written in; creating a watermark wrapping layer and a watermark
protection layer, placing the protected content in the
protection layer, solidifying the positioning pattern of the wrapping layer and the positioning and overflowing pattern of the
protection layer, and enabling the level of the load layer to be larger than that of the protection layer; and monitoring deletion of nodes of a wrapping layer and a sub-tree of the wrapping layer and attribute changes of the stack and the hidden, pausing monitoring and executing load layer reconstruction back-
insertion or protection layer style resetting or wrapping layer style resetting when a modification operation which is not allowed is identified after triggering, and recovering monitoring after
verification.