简体   繁体   English

Smalltalk Seaside-如何更改按钮的大小?

[英]Smalltalk Seaside - How do I change the size of a button?

I am writing a Smalltalk Seaside app where the resulting HTML pages will be viewed on a laptop/an iPad and/or an iPhone. 我正在编写Smalltalk Seaside应用程序,其中将在笔记本电脑/ iPad和/或iPhone上查看生成的HTML页面。 The size of a standard submit or cancel button is fine on the laptop but way to small on the tablet or the phone. 在笔记本电脑上,标准提交或取消按钮的大小合适,但在平板电脑或手机上,尺寸很小。 How do I change the size? 如何更改尺寸? I have the required style sheets for each type of viewer. 对于每种查看器,我都有必需的样式表。

I have little experience in style sheets in Seaside so I have had difficulty getting anywhere with this. 我在Seaside的样式表方面经验很少,因此很难做到这一点。

I guess that I need to set a class and a size but not sure how to do this. 我想我需要设置一个类和一个大小,但不确定如何做到这一点。

I don't know which style sheet you are using, but assuming is one of the kind of Bootstrap or Material Design Lite try adding this to your root component on the instance side: 我不知道您使用的是哪种样式表,但是假设是BootstrapMaterial Design Lite的一种,请尝试将其添加到实例端的根组件中:

updateRoot: anHtmlRoot

    super updateRoot: anHtmlRoot.
    anHtmlRoot meta
        name: 'viewport';
        content: 'width=device-width, initial-scale=1.0'

This will add the correspoding <meta> tag to the <head> element in your page, producing the following HTML output: 这会将相应的<meta>标记添加到页面中的<head>元素,从而产生以下HTML输出:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

This will indicate the browser how to scale the contents. 这将指示浏览器如何缩放内容。 For additional info, see this question: What is initial scale, user-scalable, minimum-scale, maximum-scale attribute in meta tag? 有关其他信息,请参见以下问题: meta标记中的初始比例,用户可缩放,最小比例,最大比例属性是什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM