How to write such a navigation bar like this?_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:07:51
Original
1105 people have browsed it

Initially, it looks like this.
When the mouse pointer moves over it, it becomes like this
How to write the latter style? It seems that box-shadow is used. Please give me the specific code


Reply to the discussion (solution)

Let’s use the focus event of js~~When the mouse is put on it, use the function function to loop { if judge if () { put it Change the picture when needed
}else{ Otherwise it will disappear} }
In fact, this level 2 navigation can also be done with css, but the effect is not as good as javascript
I want the css effect after putting it up, js can do it

The blue part can be a div. The word is the span in the div. When moving up, set the border of the span to black. When moving out, the border color will be transparent.
Try something like this.




Untitled Document




123

< /body>

The blue part can be a div. The word is the span in the div. When moving up, set the border of the span to black. When moving out, the border color will be transparent.
Try something like this




Untitled Document




123< ;/span>



It’s impossible to make it with border-color alone. What I want is to make it look like the picture Exactly the same effect, but the values ​​of box-shadow are different after trying many groups

Then tell me what effect you want
The effect of the two pictures you gave is OK

Then tell me what effect you want.
The effect of the two pictures you gave is OK
It is to make the border into an embedded effect. It should be box-shadow, but I tried several sets of values. None of them are correct

box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4) inset, 0px 1px 0px rgba(255, 255, 255, 0.1);
text-shadow: 0px - 1px 0px rgba(0, 0, 0, 0.796), 0px 0px 10px rgba(255, 255, 255, 0.298);

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template