我正在尝试创建一个扩展器,其中标题保持固定,内容显示在标题上方,覆盖上面的任何其他控件。在 Canvas 中设置ExpandDirection="Up"和放置 Expander 可以实现一半的效果 - 内容相对于标题向上展开,并覆盖其他控件(尽管在下面),但标题向下移动。
有什么方法可以做到这一点,但将标题保持在固定位置,以便内容最终覆盖上面的控件?
这是我到目前为止所发布的内容:
<Window x:Class="Sandbox.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="900" Width="1100">
<StackPanel>
<StackPanel Margin="20,0,0,0">
<RadioButton Content="Choice One"/>
<RadioButton Content="Choice Two"/>
<RadioButton Content="Choice Three"/>
<RadioButton Content="Choice Four"/>
<RadioButton Content="Choice Five"/>
<RadioButton Content="Choice Six"/>
</StackPanel>
<Canvas MinHeight="25" Panel.ZIndex="99">
<Expander Header="This must stay fixed" ExpandDirection="Up" Width="175">
<Grid Background="Cornsilk">
<Grid.BitmapEffect>
<DropShadowBitmapEffect />
</Grid.BitmapEffect>
<TextBlock TextWrapping="Wrap" Margin="5">
This must expand upwards, not downwards.
The header must remain exactly where it is.
This TextBlock must appear above the header …Run Code Online (Sandbox Code Playgroud) 我把各种各样的帧放在TScrollBox上.滚动时,它们正在正确滚动.现在我想添加一个保留在固定位置的位图.我尝试了一个与TScrollBox具有相同父级(TPanel)的TImage.即使我使用BringToFront,我也看不到分配给TImage的位图.
有人可以帮帮我吗?
提前致谢,
阿诺德
我只是不明白.
我为网站提供了三个简单的行.只有这三个:
<div style='height: 3000px; border: 10px dotted blue;'>
<div style='position: fixed; top: 100px; left: 100px; border: 2px dashed red; height: 100px; width: 100px;'></div>
</div>
Run Code Online (Sandbox Code Playgroud)
现在有人可以解释一下,为什么固定的内部div不会停留在Internet Explorer中的位置?在Firefox中完美运行......
谢谢你的帮助!
我正在写一个小网站来学习HTML和CSS,我无法让我的内容向任何方向滚动.
当浏览器窗口调整到任何内容不适合的点,而不是允许滚动,它只是消失.登录按钮的div应该从左侧出现950px.这意味着如果浏览器窗口小于那个,它将允许您滚动,对吧?
并且"新闻"框将显示任何内容,直到它到达浏览器窗口的底部.然后它不会滚动或显示.
有什么建议?
是否有任何常见的原因:position:fixed不会使元素流出? 我从来没有见过这个通常固定之前总是将元素应用到窗口.
我有一个大型应用程序,我已经应用于position:fixed嵌套元素.该元素是嵌套的,因为范围变量.我会链接一些HTML和CSS但似乎没有什么特别的?所以我真的不知道要展示什么.
scopeing?我正在使用angular/ui-router,我需要适当的控制器变量.
Main.html: 这种方式适用于我带来广告容器的内部 - 每周 - 类别div,但它弄乱了我的范围
<div class="inner-weekly-categories-header group">
<div class="c8-xs c8-sm c8-md product-title">
<h2>all products</h2>
<p>results <span>1-{{limitTotal}}</span> of <span>{{categoryProducts.length}}</span></p>
</div>
<div class="c8-xs c8-sm c8-md category-filter">
<input type="text" ng-model="dropdownSelected">
</div>
</div>
<div class="ad-container" ui-view="weekly">
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
.ad-container {
z-index: 5;
height: 100%;
position: relative;
overflow: hidden;
}
inner-weekly-categories-header {
color: #969696;
background: white;
border-bottom: 1px solid #e7e5e3;
font-family: 'HelveticaNeueLTCom-Roman', Helvetica, Arial, sans-serif;
position: fixed;
z-index: 10;
top: 70px;
left: 10%;
width: …Run Code Online (Sandbox Code Playgroud) 我目前正在将发动机安装到另一辆车上,我希望保持车载电脑内的燃油经济性计算正常工作。我成功地重新编码了这部分,但我一直试图找出他们使用的(简单?)两字节数据格式,但没有成功。我认为它是定点表示法,但无论我如何移动它,它都不会对齐。这两个字节如何表示正确的数字?
Some examples:
Bytes (Dec) --> Result
174,10 -> 2,67
92,11 -> 2,84
128,22 -> 3,75
25,29 -> 4,85
225,23 -> 3,98
00,40 -> 5,00
128,34 -> 5,75
Run Code Online (Sandbox Code Playgroud) 当页面滚动到顶部时,我对标签工具提示的Bootstrap-react工具提示有问题。但每当我悬停标签时,都会打开工具提示并闪烁向下和顶部滚动。
这是提到问题的基本示例

return(
<>
<OverlayTrigger
key={props.toolplace}
placement={props.toolplace}
overlay={
<Tooltip id={`tooltip-${props.toolplace}`}>
{props.tooltipText}
</Tooltip>
}
>
{props.children}
</OverlayTrigger>
</>
);
Run Code Online (Sandbox Code Playgroud)
我必须尝试解决这个问题然后
**Position: Fixed **解决我的问题
<工具提示 id={ tooltip-${props.toolplace}} style={{position:"fixed"}} > {props.tooltipText}
Run Code Online (Sandbox Code Playgroud) 我还在研究HTML和CSS,也许这可能是一个愚蠢的错误.
看看我的HTML,我有#welcome div,但是当我设置float时它就消失了:对.
(Chrome或Firefox)
谢谢!
我想制作一个像http://www.chacha.com的标题(不移动,是关于那个宽和那个高度,并且能够在其中包含div并且还必须是图像)
我从一个空白的html文档和一个空白的CSS页面开始,所以我目前还没有编写任何代码.
我已经连续两天尝试这样做,所以我真的很感激任何人都可以提供帮助.
我有gimp所以,如果有人也可以给我一个完美的标题和完美的背景大小的图像尺寸,我会更加欣赏它.
它甚至可能吗?我在"固定"位置为我的网站位置做了标题.我也有一个位于"相对"的图像.每当我滚动网站时......我注意到图像位于标题"上方".甚至我放置的推特配置文件小部件也在标题之上.它们都与标题重叠,我不想要那样.有关如何解决我的问题的任何想法?请帮忙!
顺便说一句......我听说"修复"是Android中的bug,我正在制作我的网站.
我希望在我的网站上有菜单,但是当我将宽度设置为"自动"并且位置为"固定"时,
width:auto;
菜单的宽度没有变化,只是position:fixed;完成了.
首先,我的工作演示:http://desainwebsite.com/tunasteleshop/
我的问题:当你悬停类别菜单(智能手机,移动电源等)时,应该有一个显示owl-carousel子类别和图像的下拉列表(我在鼠标悬停时禁用了上滑功能,用于此调试会话).这在Firefox,Safari和Chrome(Mac和Windows)中都运行良好.但是,当你开始向下滚动时,直到标题变为position:fixed感谢它使用Waypoint jQuery新添加的'.stuck'类,在Chrome中你将开始注意到下拉内容被剪切,隐藏.
从我之前的检查中,导致这种情况的是overflow:hidden 来自其父容器的CSS样式.但是这种风格是Owl Carousel jQuery的默认风格,必须使用它才能改变它(如果删除它会破坏这个轮播的布局).
我的另一个发现是position:fixed".header-bottom"中也有这个bug的作用.当改回亲戚时,它会恢复正常,不会被剪裁.但是,当访问者滚动网站时,客户希望标题停留位置固定.所以我也无法改变这一点..
我的问题是,为什么世界上它在Firefox和Safari中运行良好而在Chrome中运行良好?这个bug究竟是什么原因造成的?它与CSS有关吗?是jQuery相关吗?还是纯粹的Chrome bug(Windows和Mac版本)?
我的jQuery用于显示下拉列表:
$(".prodnav > li").hover(function() {
$(this).children("a").addClass("opened");
$(this).find(".subnav-area").slideDown("fast");
$(".body-mask").fadeIn("fast");
});
Run Code Online (Sandbox Code Playgroud)
我的jQuery用于调用Owl Carousel:
$(".sac-owl").owlCarousel({
autoPlay: false,
items : 6,
itemsDesktop : [1199,6],
itemsDesktopSmall : [959,5],
itemsTablet: [720,4],
itemsTabletSmall : [480, 3],
itemsMobile : [320, 3],
navigation: true,
pagination: false
});
Run Code Online (Sandbox Code Playgroud)
触发Waypoint jquery:
$('.header-bottom').waypoint('sticky', {
offset: 0
});
Run Code Online (Sandbox Code Playgroud) 我正在努力寻找如何检测固定位置的div何时开始和结束以在滚动时将鼠标悬停在某个div上。
我的div始终固定在窗口的中心位置。当我滚动页面时,我希望固定div在开始悬停时会更改另一个颜色,并在完成悬停后将其删除。我附上了一个小图来说明我的问题。恢复:
页面加载时固定的div具有黑色->开始悬停第二个div,颜色变为白色->完成以悬停第二个div,颜色恢复为黑色。
我发现了这个问题:检测职位:固定;元素越过另一个元素
当div开始越过第二个时,它会起作用,但是当悬停完成时,它不会重置颜色。我的代码:
$(window).scroll(function() {
if ($('div.fixed').offset().top < ($(".div-to-cross").offset().top - 0)) {
$('div.fixed').removeClass('white');
} else {
$('div.fixed').addClass('white');
}
});
Run Code Online (Sandbox Code Playgroud)
在此先感谢您的帮助。
fixed ×13
html ×6
position ×6
css ×5
bitmap ×1
canvas ×1
clipped ×1
css-position ×1
css3 ×1
delphi ×1
detect ×1
element ×1
embedded ×1
expander ×1
header ×1
hidden ×1
html5 ×1
jquery ×1
notation ×1
overlap ×1
overlay ×1
owl-carousel ×1
point ×1
scroll ×1
tooltip ×1
tscrollbox ×1
width ×1
wpf ×1