The simple answer to your question is that anything is possible. However, is it likely? No.
Technically speaking, a virus is just code that replicates itself by creating copies within other pieces of software. One of the best things about iOS is that it doesn't actually allow applications to directly access other software on the device. This makes it, well, almost impossible for a virus to replicate.
Note: - The only reason I don't say it's impossible is because I basically don't believe anything is impossible!
Now, in your case, you visited a website that is dodgy and the best thing to do in that situation is to immediately leave the website - and that's exactly what you did!
Also, viruses aren't the only things to be wary of. Malware, spyware, worms and trojan horses are all risks for computer users. However, because of the App Store, the risk of these things is extremely remote (from memory, the only reported cases involved the Chinese App Store, and Apple became aware of this very quickly and resolved it).
So, in a nutshell, I think the biggest risk you could have faced is malware. That's because dodgy websites are known to use pop ups to inform users that their device is infected with a virus, and then tricks them into installing malware on their device by pretending to help them make it more secure.
However, since you didn't click on anything or download anything the risk is almost nil.
You can rest easy.