URL to inherit protocol
I read somewhere that there's a trick you can use when linking images, that if you did ://d开发者_开发百科omain.com/images/s.gif
it would inherit the protocol that's currently being used, whether it be https
or http
. This isn't working and I can't remember where I read it, I think css-tricks.com, am I doing something wrong?
Drop the :
. The syntax for protocol-relative URLs is
//domain.com/images/s.gif
精彩评论