-
9 Apr 2012 1:18 AM #1
Answered: CSS3 in sencha touch
Answered: CSS3 in sencha touch
SALAM for all.
i want to do a little animation with css3 in my sencha app.
i used this code:
and in the style.css file, i put this code.Code:App.views.BankingCompte = Ext.extend(Ext.Panel, { scroll: 'vertical', items: [{ xtype: 'carousel', fullscreen: true, styleHtmlContent: true, style: 'background: #d8e2ef', items: [ { html: '<div id="animation"> <div class="test"> this is a test </div> </div>', cls: 'card' } ] }] }); Ext.reg('BankingCompte', App.views.BankingCompte);
but it doesn't work.Code:#animation { margin:auto; position:relative; left:500px; } .test { position:absolute; left:0px; -webkit-transition: all 2s linear; -webkit-transform:translateY(320px); }
does sencha touch support CSS3? or have i an error in my code ?
thank you
-
Best Answer Posted by mitchellsimoens
Sencha Touch doesn't do anything to prohibit CSS3 in fact it uses CSS3 quite a bit, the browser is what supports CSS3. What are you trying to do? I know animate <div class="test"> but try adding a button to change the CSS
Code:App.views.BankingCompte = Ext.extend(Ext.Panel, { fullscreen: true, scroll: 'vertical', layout : 'fit', items: [{ xtype: 'carousel', styleHtmlContent: true, style: 'background: #d8e2ef', items: [ { html:'<div id="animation"> <div class="test"> this is a test </div></div>', cls: 'card', items : [ { xtype : 'button', text : 'Animate', handler : function(button) { var container = button.up('container'), el = container.getEl(), div = el.down('div.test'); div.setXY([200, 200]); } } ] } ] }] });
-
9 Apr 2012 6:13 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
Sencha Touch doesn't do anything to prohibit CSS3 in fact it uses CSS3 quite a bit, the browser is what supports CSS3. What are you trying to do? I know animate <div class="test"> but try adding a button to change the CSS
Code:App.views.BankingCompte = Ext.extend(Ext.Panel, { fullscreen: true, scroll: 'vertical', layout : 'fit', items: [{ xtype: 'carousel', styleHtmlContent: true, style: 'background: #d8e2ef', items: [ { html:'<div id="animation"> <div class="test"> this is a test </div></div>', cls: 'card', items : [ { xtype : 'button', text : 'Animate', handler : function(button) { var container = button.up('container'), el = container.getEl(), div = el.down('div.test'); div.setXY([200, 200]); } } ] } ] }] });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
9 Apr 2012 7:50 AM #3
SALAM
thank you. it works. i will try to animate it with a button.
thank you


Reply With Quote