Boder布局实例

<head>
<script type="text/javascript">
Ext.onReady(function(){
var mainMenu=new Ext.Panel({//创建一个面板
//renderTo:'mainMenu',//填充到id为show的区域
//title:'我的可折叠菜单',
width:160,
height:500,
layout:'accordion',//声明布局类型

layoutConfig: {
animate: true //动画效果启用
},

items:[{
title:'菜单1',
html:'<a href="http://www.baidu.com" >菜单1的内容</a>'//这里可用div,方便其他元素插入
}, {
title:'菜单2',
html:'菜单2的内容'
}]
});


var viewport = new Ext.Viewport({
layout:'border',
items:[{
title: 'dfg',
region: 'north',
contentEl: 'north-div',
split: true,
border: true,
collapsible: true,
height: 100,
minSize: 50,
maxSize: 100
},{
title: 'south',
region: 'south',
contentEl: 'south-div',
split: true,
border: true,
collapsible: true,
height: 50,
minSize: 50,
maxSize: 120
},{
title: 'east',
region: 'east',
contentEl: 'east-div',
split: true,
border: true,
collapsible: true,
width: 120,
minSize: 120,
maxSize: 200

},

{
title: '我的菜单',
region: 'west',
contentEl: 'west-div',
split: true,
border: true,
collapsible: true,
width: 160,
minSize: 160,
maxSize: 160,
items:[mainMenu]
},{
title: 'center',
region: 'center',
contentEl: 'center-div',
split: true,
border: true,
collapsible: true
}]
});
});


</script>
</head>
<body>
<div id="north-div"></div>
<div id="center-div"></div>
<div id="west-div"></div>
<div id="east-div"></div>
<div id="south-div"></div>
</body>
</html>
<WrapPanelOrientation="Horizontal"> <CheckBox Margin="10,8,0,8" Height="22" FontSize="14" Style="{DynamicResource Style_CheckBox_Common_CSW_Default}" IsChecked ="{Binding AutoDelete, Mode=TwoWay}" Width="22" AutomationProperties.AutomationId="userControl_MI_SYM_SystemDiskStatusTab_RawDataAutoDelete_CheckBox"/> <Label VerticalAlignment="Center" FontSize="14" Foreground="#262626" FontFamily="Microsoft Yahei" FontWeight="Bold" Content="{Binding AutoDeleteMessage}"/> <TextBox x:Name="thresholdDaysTextBox" Style="{DynamicResource Style_TextBox_Common_CSW_Default}" FontSize="14" Height="22" Width="26" Padding="0.5" Text="{Binding ThresholdDays, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" IsReadOnly="{Binding IsReadyOnly ,Mode=TwoWay}" TextAlignment="Center" Validation.ErrorTemplate="{StaticResource NoErrorTemplate}" ToolTip="{Binding InputThreshold}" TextWrapping="NoWrap" TextChanged="ThresholdDaysTextBox_TextChanged" DataObject.Pasting="ThresholdDaysTextBox_Pasting" PreviewKeyDown="ThresholdDaysTextBox_PreviewKeyDown" AutomationProperties.AutomationId="userControl_MI_SYM_SystemDiskStatusTab_RawDataAutoDelete_InputTextBox"/> <Label HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="14" Foreground="#262626" FontFamily="Microsoft Yahei" FontWeight="Bold" Content="{Binding PatientRawDataMessage}" /> </WrapPanel>这部分代码,在一个固定宽度的boder内,最后一个WrapPanel中的内容过多了导致最后一个label显示不全,需要换行,黄行后,想让换行后的label缩进一定程度,如何实现
03-29
在网页设计中,`border` 和 `transparent` 结合使用能够创造出独特的视觉效果,以下是其应用及使用方法的介绍: ### 基本概念 `border` 是 CSS 中用于设置元素边框的属性,它是一个简写属性,可以同时设置边框的宽度、样式和颜色,而 `transparent` 是一种颜色值,表示透明色。通过将 `border` 的颜色设置为 `transparent`,可以实现一些特殊的图形效果。 ### 使用方法 #### 1. 绘制三角形 通过设置元素的 `width` 和 `height` 为 0,再结合不同颜色的边框,可以绘制出各种方向的三角形。 ```css .triangle { width: 0; height: 0; border: 50px transparent solid; border-top-color: black; } ``` 上述代码中,元素的四个边框宽度都为 50px,颜色为透明,仅上边框颜色为黑色,从而形成一个向下的三角形[^1]。 #### 2. 绘制梯形 通过调整不同边框的宽度和颜色,可以绘制出梯形。 ```css .trapezoid { width: 100px; border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 50px solid blue; } ``` 在这个例子中,元素具有一定的宽度,左右边框为透明,底部边框有颜色,从而形成一个梯形。 #### 3. 实现箭头效果 结合 `border` 和 `transparent` 可以制作出箭头效果,常应用于导航指示等场景。 ```css .arrow { width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 15px solid green; } ``` 此代码创建了一个向右的箭头,通过设置上下边框为透明,左边框有颜色实现[^1]。 ### 完整示例代码 以下是一个包含三角形绘制的完整 HTML 和 CSS 示例: ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Border Transparent Example</title> <style type="text/css"> .top { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 100px solid red; } </style> </head> <body> <div class="top"></div> </body> </html> ``` 在这个示例中,通过设置元素的边框属性,创建了一个红色的向上三角形[^3]。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值