简体   繁体   中英

Externally linking xml with different css files

I have one xml file. I want to format it using different css files. For example: I click one button on html page which displays x.xml file with a.css style, I click different button, it displays same x.xml file but with different style (let say b.css).

Something like this wont work:

<?xml-stylesheet type="text/css" href="a.css" ?>

I know I can do this with .xsl and .php

Is it possible to do this with css on the client side.

如何使用相同的.css文件并添加2种不同的按钮样式,然后可以使用JS将样式从1个.css更改。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM