gpt4 book ai didi

用于固定图像重叠菜单的 CSS

转载 作者:太空宇宙 更新时间:2023-11-04 15:51:23 25 4
gpt4 key购买 nike

我有这张图片:

triangle

这是网站http://maximearchambault.com

左边是菜单,右边是内容。

我想做的是将三 Angular 形图像放在菜单旁边并与内容重叠,这样它看起来就像是菜单的一部分。

这里有一个例子:http://www.shockblast.net/marla-singer-photography/

当你向下滚动时,你会看到一只眼睛出现,一切都在它下面。眼睛不动。

所以我希望我的图像左对齐,与右栏中的内容重叠。

这是我的默认/style.css

*/

body {
font-size: 13px;
font-family: 'Helvetica Neue', Arial, Helvetica, Verdana, sans-serif;
background: #fff;
color: #000;
line-height: 1.3em;
/* font-weight: 300; */
}

/* link scheme */
/* you can customize links further down the page too */
a:link { text-decoration: none; color: #000; }
a:active { text-decoration: none; color: #00cc00; }
a:visited { text-decoration: none; color: #999; }
a:hover { text-decoration: underline; }
a img { border: none; }

/* general styles */
small { font-size: 9px; }
code { font-family: monospace; }
blockquote { padding-left: 9px; }

/* headings */
h1 { font-size: 13px; margin-bottom: 1em; font-weight: bold; }
h2 { font-size: 13px; margin-bottom: 1em; font-weight: bold; }
h3 { font-size: 13px; margin-bottom: 1em; }
h4 { font-size: 13px; margin-bottom: 1em; }

/* paragraph width */
#index p { margin-bottom: 1em; }
#exhibit p, code, blockquote { width: 450px; margin-bottom: 1em; /* line-height: 1.3em; */ }

/* highlighter style - maybe you want to change colors? */
.highlight { background: #ccff00; color: #000; }

/* never adjust the margin or padding here unless you seriously know what you are doing */
/* think #index .container and #exhibit .container for only padding adjustments */
#index { width: 215px; background: #F2F2F2; /* line-height: 1.3em; */ }
#exhibit { margin: 0 0 0 215px; }

/* styling the index */
#index ul { list-style: none; margin: 0; }
#index ul.section { margin-bottom: 1em; }
#index ul.subsection { }

/* the follow rules for index are not required */
/* they are mostly for complex customization */
/* for tag display */
#index ul#all_tags { list-style-type: none; margin-bottom: 1em; }
#index ul#all_tags li { display: inline; margin-right: 3px; }
#index ul#all_tags li a { }

/* active section title */
#index span.active_section_title,
#index span.active_section_title a { font-weight: bold; }

/* active exhibit title parts */
li.active a:link, li a.active, li.active a:hover, li a.active, li.active a:active, li a.active,
li.active a:visited, li a.active, li span.active, #index ul.section li.active a:link,
#index ul.section li.active a:hover, #index ul.section li.active a:active, #index ul.section li.active a:visited
{ font-weight: bold; }

/* additional #index options */
#index ul li .password a { /* background: url(../img/locked.gif) right center no-repeat; padding-right: 18px; */ }

/* the "new" indicator */
#index ul li sup { color: #0c0; font-weight: bold; text-transform: uppercase; font-size: 8px; vertical-align: top; }
/* end styling for index */

/* links styles only for the #index region */
#index a:link { }
#index a:hover { }
#index a:active { }
#index a:visted { }

/* links styles only for the #exhibit region */
#exhibit a:link { }
#exhibit a:hover { }
#exhibit a:active { }
#exhibit a:visted { }

/* this is where you adjust your paddings for #index and #exhibit together */
.container { padding: 27px 9px 25px 27px; }

/* this is where you pad them separately */
#index .container { }
#exhibit .container { }

最佳答案

将这些属性放在要修复的元素上:

  .fixedElement
{
position: fixed;
z-index: 10;
top: 20px;
left: 20px;
}

这样它就会一直固定在左上角。即使在滚动之后

关于用于固定图像重叠菜单的 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11177382/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com