Actually transformer works when input voltage is changing continuously. As DC is steady, transformer will not work. But you can feed DC to a circuit which will make changing voltage at the transformer input, which will then be stepped up or stepped down. ... And such DC to DC converters are available in market.