Home >Web Front-end >CSS Tutorial >How to make navigation bar transparent with css

How to make navigation bar transparent with css

WBOY
WBOYOriginal
2021-11-11 11:26:597625browse

In CSS, you can make the navigation bar transparent through the opacity attribute. You only need to add the "opacity: transparency value;" style to the navigation bar element; the transparency value ranges from 0 to 1, and the value The smaller the value, the higher the transparency.

How to make navigation bar transparent with css

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

How to make the navigation bar transparent in css:

Add an opacity parameter to the css to set the opacity , css opacity:x, the value of x is from 0 to 1.

If opacity: 0.8, if opacity: 0.5, it means translucent. The smaller the number, the higher the transparency.

Refer to the code below

How to make navigation bar transparent with css

This is a navigation bar with normal transparency

How to make navigation bar transparent with css

When adding opacity After the attributes:

How to make navigation bar transparent with css

Output result:

How to make navigation bar transparent with css

For more programming-related knowledge, please visit: Programming Video ! !

The above is the detailed content of How to make navigation bar transparent with css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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