Ext2.2设置Panel中Title的样式

 

效果图:

 

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gbk">
        <title>04.form</title>
        <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
        <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="../../ext-all-debug.js"></script>
        <script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';

Ext.onReady(function(){

	var panel = new Ext.Panel({
		renderTo : containername,
		//下面这行不能有.
		//frame : true,
		title : 'Title',
		html : 'text'
	});
	
	panel.header.setStyle( {
		color: '#F00',  //设置颜色
		background : '',  //去掉默认的背景
		'background-color': '#666'  //设置背景色
	});

});
        </script>
    </head>
    <body>
        <div id="containername" style="margin:100px;"></div>
    </body>
</html>

 

你可能感兴趣的:(JavaScript,html,css,ext)