1. 程式人生 > 其它 >SAPUI5 Walkthrough Step 13: Margins and Paddings

SAPUI5 Walkthrough Step 13: Margins and Paddings

https://sapui5.hana.ondemand.com/#/topic/17b87fbafb5a4474982760d2a3a73e69

邊距和填充

使用sapui5中的標準CSS類, 來實現邊距和填充。

修改webapp/view/App.view.xml檔案,去掉Input元件的description屬性,新增Text元件。並增加元件的class屬性

<mvc:View controllerName="sap.ui.demo.walkthrough.controller.App" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"
displayBlock="true" xmlns="sap.m"> <Shell> <App> <pages> <Page title="{i18n>title}"> <content> <Panel headerText="{i18n>helloPanelTitle}" class
="sapUiResponsiveMargin" width="auto"
> <content> <Button text="{i18n>showHelloButtonText}" press=".onShowHello" class="sapUiSmallMarginEnd"/> <Input value
="{jsonModel>/recipient/name}" valueLiveUpdate="true" width="50%"/> <Text text="Hello {jsonModel>/recipient/name}" class="sapUiSmallMargin"/> </content> </Panel> </content> </Page> </pages> </App> </Shell> </mvc:View>

執行