It is the pseudo class “target” working on an IPhone? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

It is the pseudo class “target” working on an IPhone?

I have this code: https://code.sololearn.com/WQ85PgBD3Pky/?ref=app Render in my pc But not in my iPhone. Please, help me.

3rd Mar 2018, 5:43 PM
Luiggi Gonzales Moya
Luiggi Gonzales Moya - avatar
1 Answer
0
The way that the target pseudo class works is that it checks the URL you currently have in the search bar and depending on if the extension at the end matches a certain element's ID will it run. For example, with an element with the target pseudo class in CSS, when it is pressed or interacted with, the URL at the top will change and add the ID of the element at the end, which triggers the target pseudo class. Because you are on mobile, there is no URL that the program can base it off of, rendering :target nearly useless. Hope this helped!
3rd Mar 2018, 6:00 PM
Faisal
Faisal - avatar