For iPhone 5,
@media screen and (device-aspect-ratio: 40/71)
for iPhone 6,7,8
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : portrait)
for iPhone 6+,7+,8+
@media screen and (-webkit-device-pixel-ratio: 3) and (min-device-width: 414px)
Working fine for me as of now.