Yushin
Yushin

Reputation: 1750

React Native :after styling like css

How do style in react-native like we do in sass

.pro_image:after {
  content: '';
  position: absolute;
  border-radius: 100%;
  top: -10px;
  left: -10px;
  bottom: -10px;
  right: -10px;
  border: 10px solid rgba(255, 255, 255, 0.075);
}

because I tried using the same technique but it seems not to be working

Upvotes: 10

Views: 31380

Answers (1)

Funk Soul Ninja
Funk Soul Ninja

Reputation: 2193

Css pseudo classes do not work in react-native, but if you want your styles to look as close to css as possible I would recommend using something like Styled Components. It works on both web and react-native.

Upvotes: 9

Related Questions