Wasim Khan Wasim Khan - 8 months ago 55
TypeScript Question

How to change css by using tag or class name in typescript?

I want to change top position of element in ionic 2 using their tag name or class name just like we do in JavaScript.


Please you can try

//Get the element by tag name
let element = document.getElementsByTagName('Tag_name');   

Remember it when you get an element by tag it will return an array.

Please add an example, so I can help you