search
HomeWeb Front-endHTML Tutorial导航倾斜样式如何用CSS实现_html/css_WEB-ITnose


实现上面图的效果而且不能用绝对定位,因为都是调用的原因。。。求大神指点方法。。。


回复讨论(解决方案)

什么意思,怎么没有 看明白呢!!

什么意思,怎么没有 看明白呢!!

就是上面的高亮特效,有个倾斜样式,这个地方的样式不会搞了

什么意思,怎么没有 看明白呢!!

切PNG的图还是用CSS3背景实现啊?

CSS3背景实现啊,放假时间,论坛人少

 最后加个 斜角图片


CSS3背景实现啊,放假时间,论坛人少[/quote关键是那样做的话IE浏览器不兼容啊,不可能光做FF的兼容吧

最简单的方法是切10张背景图。每个导航的鼠标移来、移出时候改变背景图即可,兼容所有浏览器

最简单的方法是切10张背景图。每个导航的鼠标移来、移出时候改变背景图即可,兼容所有浏览器

你这个背景图是怎么做的?光做倾斜的还是整个背景?光做倾斜的话,块级元素不用绝对定位,告诉我,你是怎么实现的

整个背景,去掉文字

整个背景,去掉文字

这个布局是怎样的呢,能不能简单写一写,整个背景实在想不通!

之前做?的斜的?航?你?考

http://sab888.com/

之前做?的斜的?航?你?考

http://sab888.com/


真人*啊,好恶心这类网站,经常挂黑链都是这样的。。。不过仔细一看倾斜的导航效果是不一样的,你没仔细看我的!

CSS3背景实现啊,放假时间,论坛人少

求方法,能兼容IE的

 最后加个 斜角图片

不行,这个是高亮特效鼠标放上去才会显示的。用hover可以实现么

纯css实现比较困难,使用js很简单实现、

纯css实现比较困难,使用js很简单实现、

JS放个代码看看呀


 最后加个 斜角图片

不行,这个是高亮特效鼠标放上去才会显示的。用hover可以实现么

用hover+图片 怎么不能实现?

css3 可以写

这个效果是多个div重叠在一起,然后设置每个div的样式为那样平行四边形什么的,通过设置opacity实现透明效果,如果要让他悬浮,可以设置position,fixed

具体的你也没说明白,如果还没解决加下我QQ讨论下吧,,515445681

1.用负的margin-left去对齐,样子看起来差不多,不过文字要另去定一下位置,hover出背景的触发也总觉得怪怪的

2.把左右分开,hover的时候直接去平移左边的背景图去对齐
3.用css3去转换nav的形状,不过老版本估计只能显示方的了

这个效果是多个div重叠在一起,然后设置每个div的样式为那样平行四边形什么的,通过设置opacity实现透明效果,如果要让他悬浮,可以设置position,fixed

不能用定位的,因为这个是织梦调用的导航,如果要定位就要用JS。。。。让DIV重叠在一起不用定位实在不懂



 最后加个 斜角图片

不行,这个是高亮特效鼠标放上去才会显示的。用hover可以实现么

用hover+图片 怎么不能实现? 能不能指点下,用hover+背景图,主要问题还是重叠一起而且不能定位

1.用负的margin-left去对齐,样子看起来差不多,不过文字要另去定一下位置,hover出背景的触发也总觉得怪怪的

2.把左右分开,hover的时候直接去平移左边的背景图去对齐
3.用css3去转换nav的形状,不过老版本估计只能显示方的了

你这个还是不太一样,上面的倾斜角没有超过第二个DIV层,那样的话用边框特性border就能实现




 最后加个 斜角图片

不行,这个是高亮特效鼠标放上去才会显示的。用hover可以实现么

用hover+图片 怎么不能实现? 能不能指点下,用hover+背景图,主要问题还是重叠一起而且不能定位

我觉得 主要问题是 你被倾斜 诱惑了
你就看成一个 正方形的区域 
现在鼠标上去  你就显示一个正方形 带颜色的 div 看看行不  以后在换背景 位置在调整下

这么多大神都没有帮上呵呵,跟我做的个黄岛论坛一样,还得靠自己解决

这么多大神都没有帮上呵呵,跟我做的个黄岛论坛一样,还得靠自己解决

后来你实现了没,上面那些伪大神根本没仔细我的问题和图样,哎





 最后加个 斜角图片

不行,这个是高亮特效鼠标放上去才会显示的。用hover可以实现么

用hover+图片 怎么不能实现? 能不能指点下,用hover+背景图,主要问题还是重叠一起而且不能定位

我觉得 主要问题是 你被倾斜 诱惑了
你就看成一个 正方形的区域 
现在鼠标上去  你就显示一个正方形 带颜色的 div 看看行不  以后在换背景 位置在调整下
你还是没看我说的,正方形的区域想重叠,就必须用绝对定位,现在的问题是都是调用的,一句代码调出来的导航,实现重叠只能写JS..

看了大神些的回复。。。。其实觉得如果只是想要那种效果的话,可以直接作图嘛,用hover来实现鼠标滑过的效果嘛!!!再加上上面大神 说的半透明,用z-index把几个div重叠起来!!!(我也是新手,所以我的表述可能有问题,)

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
Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?Mar 04, 2025 pm 12:32 PM

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

How to efficiently add stroke effects to PNG images on web pages?How to efficiently add stroke effects to PNG images on web pages?Mar 04, 2025 pm 02:39 PM

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

What is the purpose of the <datalist> element?What is the purpose of the <datalist> element?Mar 21, 2025 pm 12:33 PM

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

How do I use HTML5 form validation attributes to validate user input?How do I use HTML5 form validation attributes to validate user input?Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What are the best practices for cross-browser compatibility in HTML5?What are the best practices for cross-browser compatibility in HTML5?Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the purpose of the <progress> element?What is the purpose of the <progress> element?Mar 21, 2025 pm 12:34 PM

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

What is the purpose of the <meter> element?What is the purpose of the <meter> element?Mar 21, 2025 pm 12:35 PM

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

How do I use the HTML5 <time> element to represent dates and times semantically?How do I use the HTML5 <time> element to represent dates and times semantically?Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version