layout 相关问题

布局标记用于关于对象相对于包含元素的放置,对齐和对齐的问题。有关CSS的问题,请改用“css”标签。

ggplot2 中带有一个图例的并排图

我想知道如何使用 ggplot2 创建具有一个常见图例的并排图。我见过一些类似的问题,但不确定如何将其直接应用到我的代码中。我已经提供了我...

回答 1 投票 0

如何缩放 SVG 图像以填充浏览器窗口?

这看起来应该很容易,但我只是没有得到什么。 我想制作一个包含单个 SVG 图像的 HTML 页面,该图像会自动缩放以适合浏览器窗口,而不需要任何

回答 2 投票 0

将可组合项置于屏幕中央

我有一个简单的加载可组合项: @可组合 有趣的加载(){ 循环进度指示器() } 我希望它位于屏幕中央。我搜索了文档并找到了

回答 1 投票 0

使用 Flexbox 来应对响应式卡片布局。需要帮助在不同的屏幕尺寸上正确对齐元素

我正在尝试使用 Flexbox 创建响应式卡片布局。但是,当我调整浏览器窗口大小时,卡片的间距不均匀并且无法正确对齐。我尝试过调整 Flex-Dire...

回答 1 投票 0

如何让Container在Expanded to Row时换行到文本,并适合它自己的宽度?

这是我最近遇到的一个奇怪的布局问题。 我尝试了很多不同的方法来构造所有的失败。 这就是我想要的: 连续; 文本应扩展到该行; 文本有一个包含...

回答 1 投票 0

为什么 [[no_unique_address]] 对公共数据成员没有影响?

考虑以下示例: 模板 结构体A { [[无唯一地址]] T t; 整数我; }; 结构体 B { 长l; 整数我; }; C类{ 长l; 整数我; }; 海湾合作委员会...

回答 1 投票 0

如何居中对齐容器父级?

我有一个主网格。它的网格项也是容器(容器类型:内联大小),这有助于根据其宽度为它们提供各种内部布局。 我怎样才能居中对齐主要...

回答 1 投票 0

如何在 Next js 13 中隐藏登录和注册页面的导航和页脚

我有登录和注册页面,但导航和页脚出现在所有页面上。我不知道如何使导航和页脚不出现在登录和注册页面中。在 Next 12 中,我通常使用

回答 3 投票 0

截断图像周围浮动的文本

我正在努力解决 HTML/CSS 布局问题。 我需要创建一个显示新闻报道内容的动态组件,我的目标是获得一个预定义大小(高度)的组件,

回答 1 投票 0

Nextjs 13 中布局和模板有什么区别?

有人可以向我解释一下它们之间的区别吗? 我觉得布局和模板是同一件事。

回答 1 投票 0

跨越多列的qt网格布局

我正在尝试创建这个几何图形: _ ___ | | | |1| 3 | |_|___| |_2_| 1 号盒子又高又瘦,2 号盒子又短又宽。我无法完全正确地获得布局。当我取消

回答 1 投票 0

ASP.NET Core Razor 页面 _Layout.cshtml.css 未应用

我偶然发现了 CSS 文件 _Layout.cshtml.css 的问题。好吧,简短而快速的描述,CSS 类“页脚”未被应用。其他 CSS 类,如“border-top”和“text-center”...

回答 2 投票 0

无法向 ScrollView 添加页脚 - Android

我目前正在开发移动应用程序,当我尝试将页脚放在 ScrollView 下时遇到问题。 这是我的代码: 我目前正在开发移动应用程序,当我尝试将页脚放在 ScrollView 下时遇到问题。 这是我的代码: <RelativeLayout android:id="@+id/RelativeLayout01" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:layout_alignParentBottom="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/bottomcontent" android:orientation="vertical" android:background="@drawable/border"> //the footer is added dynamically </RelativeLayout> <ScrollView android:layout_weight="1" android:id="@+id/scroller" android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:id="@+id/contentcontainer"> <LinearLayout android:id="@+id/scrollcontentcontainer" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> //the content is added dynamically from a layout template </LinearLayout> </LinearLayout> </ScrollView> </RelativeLayout> ScrollView的内容是一组相对布局,里面有一些按钮和文本视图。它基于我多次膨胀的布局。 页脚只是一个 LinearLayout,其中也有一些按钮。 问题是我尝试了在互联网上找到的所有不同的解决方案,但没有一个有效。就我而言,页脚卡在 ScrollView 的内容下方,而不是 ScrollView 本身下方,因此我必须向下滚动,直到内容结束才能到达页脚。但页脚应该保留在屏幕底部...... 我也尝试了这些解决方案,但没有任何效果: http://www.javacodegeeks.com/2013/10/android-fixed-header-and-footer-with-scrollable-content-layout-example.html (当我尝试这个时,我在屏幕顶部有一个页脚,没有其他东西......) http://www.byteslounge.com/tutorials/android-fixed-header-and-footer-with-scrollable-content-layout-example 和其他一些(也不起作用!) 我也尝试了所有可能的东西,比如使用重力、重量、fillViewPort、对齐到底部......但不可能得到预期的结果。 最小API设置为14,我使用Android Studio。 编辑1: 可绘制边框: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:bottom="-2dp" android:left="-2dp" android:right="-2dp" android:top="2dp"> <shape android:shape="rectangle" > <stroke android:width="1dp" android:color="#000000" /> <solid android:color="#3b010101" /> <padding android:left="10dp" android:right="10dp" android:top="10dp" android:bottom="10dp" /> </shape> </item> </layer-list> 您可以尝试以下方法,我在 ScrollView 中添加 RelaveLayout 时也遇到了麻烦。 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:id="@+id/bottomcontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="@drawable/border"> <!---add something there eg:--> <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Test"/> </RelativeLayout> <ScrollView android:id="@+id/scroller" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_above="@id/bottomcontent" android:layout_alignParentTop="true"> <LinearLayout android:id="@+id/contentcontainer" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout android:id="@+id/scrollcontentcontainer" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> </LinearLayout> </LinearLayout> </ScrollView> </RelativeLayout> . 我在本文档中找到了以下内容。这肯定会导致问题 注意:在平台版本 17 及更低版本中,RelativeLayout 受到 一个测量错误,可能会导致子视图被测量 MeasureSpec 值不正确。 (参见MeasureSpec.makeMeasureSpec 更多详细信息。)当relativelayout容器被 放置在滚动容器中,例如 ScrollView 或 水平滚动视图。如果自定义视图未正确配备 使用 MeasureSpec 模式进行测量 UNSPECIFIED 被放置在 relativelayout,无论如何,这都会像relativelayout一样默默地工作 将传递一个非常大的 AT_MOST MeasureSpec 相反。 此行为已为设置的应用程序保留 android:targetSdkVersion="17" 或更旧的清单的使用-sdk 兼容性标记。面向 SDK 版本 18 或更高版本的应用程序将 接受正确的行为

回答 1 投票 0

将图像放入网格中最大宽度/高度内的多个图像的技术?

我已经盯着这个看了大约一个小时,尝试每一种排列如何强制图像调整大小并保持宽高比?但这些都不能解决我的问题。 这是我手动调整大小的两张图片

回答 1 投票 0

如何设置JPanel在屏幕任意位置的位置

我需要有许多 JPanel,但我无法将它们放置在我想要的位置,因为当我尝试更改边界等内容时,它们要么会消失。任何帮助表示赞赏 这是c...

回答 1 投票 0

为什么我无法在 Qt Designer 中的 QStackedWidget 中设置页面布局?

在 Qt 4.8.0 的 Designer 中重现的步骤: 我在 Qt Designer 中创建一个新的对话框表单 我将 QStackedWidget 添加到对话框中 我设置对话框的布局,使堆叠布局大小与...

回答 2 投票 0

有没有办法在SliverAppBar的底部小部件中实现动态高度

SliverAppBar有一个属性bottom,它必须有preferredSize。 现在我让它返回恒定值: ... 新的 SliverAppBar( 扩展高度:_kFlexibleSpaceMaxHeight,

回答 6 投票 0

在哪里放置svelte默认布局模板组件

简介 在 svelte 中,我们知道默认布局存储在 src/routes/+layout.svelte 我也知道有些人使用组布局 src/route/(app)/+layout.svelte 但这不是我要找的......

回答 1 投票 0

在React Native中获取软导航栏的高度

我在React Native中以与屏幕相同的高度渲染内容(Dimensions.get(“window”).height),但是当Android手机具有软导航栏时,某些内容会被隐藏...

回答 3 投票 0

PySide 自定义小部件不会自动适应 QTableWidget

我正在尝试创建一个自定义小部件 RangeSpinBox。该小部件不会自动适应 QTableWidget,如下图所示。 导入系统 从 PySide 导入 QtGui 类 RangeSpinBox(QtGui.QW...

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.