小编Ara*_*rez的帖子

为 <aside>、<main> 和其他 flex 布局元素添加滚动条

我试图将内容限制在基于 flex 的布局中,该布局使用以下简单代码:

<header>header</header>
<section>
  <aside>aside long content...</aside>
  <main>main long content...</main>
  <aside>aside long content...</aside>
</section>
<footer>footer</footer>
Run Code Online (Sandbox Code Playgroud)

我拥有的 CSS 是:

body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

header, footer {
  height: 50px;
  min-height: 50px;
  background: black;
  color: #fff;
}

section {
  flex-grow: 1;
  display: flex;
}

section aside  {
  width: 100px;
  background: #ccc; 
  height:100%;
  overflow:scroll;
}

section main {
  overflow:scroll;
  flex-grow: 1;
}
Run Code Online (Sandbox Code Playgroud)

问题是,当向旁边或主要元素添加长内容时,这些元素中的水平滚动显示正常,但是垂直滚动没有显示,但元素变得与其内容一样高,将所有内容推到它下面(页脚)离屏。然后客户区获得垂直滚动。

我需要这些元素在没有内容的情况下仍然表现得像它们显示的那样,但如果它们的内容大于它们的屏幕尺寸,则有滚动条。

而不是这个(溢出得到滚动): 在此处输入图片说明

我明白了(溢出是可见的,将所有元素都关闭): 在此处输入图片说明

html css layout

5
推荐指数
1
解决办法
5028
查看次数

Android相机意图和方向问题

在我的Android应用程序中启动相机意图时遇到以下问题:如果应用程序是以方向启动的,比如描绘,则相机仅适用于描绘.如果您将手机方向更改为横向,应用程序正在运行或相机意图正在运行,并尝试拍摄风景照片,则应用程序将关闭并显示错误.就好像相机意图只能以应用程序启动时的方向拍摄.

只有在风景中开始我的应用程序才能在风景中拍摄照片,并且只有在我开始拍摄时才能拍摄肖像照片.启动相机意图的代码非常简单:

        String path = (new StringBuilder()).append(Environment.getExternalStorageDirectory()).append("/"+fileName).toString();
        File file = new File(path);
        Uri outputFileUri = Uri.fromFile(file);
        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        intent.putExtra("output", outputFileUri);
        startActivityForResult(intent, CAMERA_RESULT);
Run Code Online (Sandbox Code Playgroud)

任何想法为什么会这样?我在清单中没有与相机方向有关的任何事情......

干杯

亚兰

camera android orientation

3
推荐指数
1
解决办法
5342
查看次数

Mediafire开发者不会向我展示创建新应用

我已经给了mediafire技术支持(两次)没有回答的门票:我创建了两个不同的帐户,完全不同的信息,一个免费和一个临(付费).他们都没有向我显示我的帐户 - >设置 - >开发人员中的创建新应用程序框.我使用过的电子邮件已经过验证......有任何线索吗?谢谢

mediafire

2
推荐指数
1
解决办法
773
查看次数

在Delphi中我如何将TPanel变量类型设置为null?

Helo,我有以下东西:selectedPanel应该获得点击的面板对象,如果单击该表单,selectedPanel应为"null",nada,empty等:)

var
     selectedBlock: Tpanel; <== fixed typo

...

procedure TForm1.stubPanelMouseDown(Sender: TObject...
begin

    ...

    Panel:= Sender as TPanel;

    if (*selectedBlock is not null*) then
    begin
            // ie, store the current panel
            selectedBlock:= Panel;
    end
    else
    begin
            // empty the selection
            *selectedBlock:= null*;
    end;
Run Code Online (Sandbox Code Playgroud)

所以问题是:我如何将该变量设置为"null"?执行selectedBlock:= Unassigned会引发错误.

谢谢

编辑:这仍然会引发错误:访问冲突

if (selectedBlock=nil) then <= fixed and works
  begin
    selectedBlock:= Panel;
  end
  else
  begin
     selectedBlock:= nil;
 end;
Run Code Online (Sandbox Code Playgroud)

delphi tpanel

-5
推荐指数
1
解决办法
428
查看次数

标签 统计

android ×1

camera ×1

css ×1

delphi ×1

html ×1

layout ×1

mediafire ×1

orientation ×1

tpanel ×1