开发者

URL to inherit protocol

开发者 https://www.devze.com 2023-02-04 18:44 出处:网络
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

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号