我试图在主页之后开始每页大约500px,类似于这个网站:http://unionstationdenver.com/
您会注意到在主页后查看页面时,您会自动向下滚动而不另行通知,但您可以向上滚动以再次调整特色滑块.
我玩过scrolledHeight,但我不认为这就是我需要的????
基本上我有一个特色部分位于我的所有内容页面之上,但在向上滚动之前,您不应该看到此部分.有帮助吗?
我在twitter-bootstrap中有一个div元素,其内容将在屏幕外垂直溢出.
我希望div取出浏览器窗口大小的高度,让其余内容在窗口中垂直滚动.
我有一个不能正常工作的样本@ jsFiddle
#content {
border: 1px solid #000;
overflow-y:auto;
height:100%;
}
<div class="container-fluid">
<div class="row-fluid">
<div class="span3">Side Bar</div>
<div class="span9" id="content">
Content Bar Example Content
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
编辑 -
对不起伙计我想我的问题出错了.
我想要的是我的div必须填满屏幕中其余的垂直空间.
如果有人可以建议一个响应式解决方案,那就太好了
在android中,如何创建一个具有最大高度的滚动视图,并包装内容,基本上它是垂直包装内容,但具有最大高度?
我试过了
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="200dp"
android:layout_alignParentBottom="true" >
<LinearLayout
android:id="@+id/maincontainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
但这不起作用?
我的iframe有问题.我真的希望框架根据iframe中的内容自动调整高度.我真的想通过没有javascript的CSS来做到这一点.但是,如果我也有,我会使用javascript.
我试过height: 100%;和height: auto;,等我只是不知道什么尝试!
这是我的CSS.对于框架......
#frame {
position: relative;
overflow: hidden;
width: 860px;
height: 100%;
}
Run Code Online (Sandbox Code Playgroud)
然后是框架的页面.
#wrap {
float: left;
position: absolute;
overflow: hidden;
width: 780px;
height: 100%;
text-align: justify;
font-size: 16px;
color: #6BA070;
letter-spacing: 3px;
}
Run Code Online (Sandbox Code Playgroud)
页面的编码看起来像这样......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ?? "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>...</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="header">
</div>
<div …Run Code Online (Sandbox Code Playgroud) 它在iphone中是20像素,但iPad上状态栏的高度是多少?我认为它是20像素,因为我正在制作的视图大小为768*1004.
我已经使用outerHeight,并outerWidth在许多地方.现在,在jQuery 1.8发布之后,我遇到了很多由对象返回而不是它的大小引起的问题.
例如:
$('#stackoverflowdiv').Height() // returns 100 px
$('#stackoverflowdiv').outerHeight() // returns "stackoverflowdiv" div
Run Code Online (Sandbox Code Playgroud)
我发现解决这个问题的唯一方法是在函数中使用"true/false",如下所示,但我得到的结果与标准width()和height()函数相同:
$('#stackoverflowdiv').outerHeight(true) // returns 100 px
$('#stackoverflowdiv').outerHeight(false) // returns 100 px
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么这不再工作或以其他方式获得元素的高度/宽度+其边距.
编辑:我开始相信这是因为我使用contents()函数在iframe中选择元素.我会尝试做一个演示.
我是Bootstrap 3的新手,我希望我的登陆页面上有3个面板,高度相同,即使中间面板的内容较少.调整大小后,它们会变成相同的高度,但在初次访问页面时不会.
我已经尝试用CSS隐藏溢出,它切断了面板的底部,这不是我想要的,所以我想我需要使用jQuery.
这是我的代码:
<div class="row-fluid">
<!--begin panel 1 -->
<div class="col-md-4">
<div style="text-align:center" class="panel panel-primary">
<div class="panel-heading">
<h1 class="panel-title text-center">Web y Metrícas</h1>
</div>
<!-- end panel-heading -->
<div class="panel-body">
<p>
<img style="margin: 0 auto;" class="img-responsive" src="web.png" height="30%" width="30%" alt="Web y Metrícas" />
</p>
<p class="text-left lead2">Apoyamos estratégicamente la presencia de tu empresa en el mundo digital, a través de la construcción de recursos web atractivos para tus clientes.</p>
<ul class="text-left">
<li>Web Corporativas</li>
<li>Tiendas Virtuales</li>
<li>Plataformas e-Learning</li>
<li>Arquitectura de Información</li> …Run Code Online (Sandbox Code Playgroud) 我有一个显示图像的GridView,不幸的是,这些图像的大小不同.它们显示在两行文本之间:
text1.1 text1.2
ImageView(IMAGE1) ImageView(IMAGE2)
text2.1 text2.2
text3.1
ImageView(IMAGE3)
text4.1
Run Code Online (Sandbox Code Playgroud)
等等....
如果IMAGE1是相同的高度IMAGE2,一切都很好,但如果IMAGE1是长比IMAGE2,text2.1会碰上text3.1(填充似乎没有多大帮助,因为有太多的它,当图像的同样的高度).
我知道有一种方法可以在ImageView中拉伸图像,因此它们的高度相同,但是可以保持图像不变并以某种方式设置行高吗?
我正在开发这个网站,我希望右侧边栏有100%的高度.
body {
height: 100%;
min-height: 100%;
position: relative;
}
mydiv {
height: 100%;
min-height: 100%;
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 290px;
}
Run Code Online (Sandbox Code Playgroud)
我已经阅读了很多答案,特别是这个(Prestaul答案): 当内容超出窗口大小时,在绝对定位的元素上设置100%的高度.
但对我来说这个技巧不起作用,小提琴例子也不起作用!
即使在指定Container GridView的高度之后,我的代码也会生成方形小部件.
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<String> widgetList = ['A', 'B', 'C'];
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Container(
child: new GridView.count(
crossAxisCount: 2,
controller: new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: widgetList.map((String value) {
return new Container(
height: 250.0,
color: Colors.green,
margin: new EdgeInsets.all(1.0),
child: …Run Code Online (Sandbox Code Playgroud) height ×10
css ×5
html ×3
android ×2
gridview ×2
css-position ×1
dart ×1
flutter ×1
iframe ×1
ipad ×1
java ×1
javascript ×1
jquery ×1
jquery-1.8 ×1
panel ×1
row-height ×1
scroll ×1
statusbar ×1
xml ×1