How to create that kind of navigation effect? ! Ask for advice! _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:22:00
Original
1035 people have browsed it



Who can tell me how to make this effect? !


Reply to discussion (solution)

I remember our teacher said that the simplest thing is overflow hiding. . . Then use a:hover to set the mouse pointer to display.

<div  id="test">offset</div><div id="title">Hello World.</div>
Copy after login

$(function() {$("#test").bind({"mouseenter": function(e) {      $("#title").css("left",e.pageX).css("top",e.pageY).show();},"mouseout": function(e) {        $("#title").hide();}});});
Copy after login

     #title {    width:100px;    height:100px;    display:none;    position:absolute;    background-color:red;    }#test {    	position:absolute;    text-align:center;    left:20%;     top:20%;    right:50%;    bottom:50%;    background-color:gray;    border: 1px solid ;}
Copy after login


The general idea is like this, you can adjust the details yourself, it’s a matter of positioning and hiding reality.

JavaScript                                                                                                                    It needs to be correct and the positioning needs to be accurate, otherwise it won't come out.