是否可以将CSS伪元素添加到SVG?我希望使用DisplayMetrics displayMetrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int height = displayMetrics.heightPixels;
int width = displayMetrics.widthPixels;
LatLngBounds bounds = new LatLngBounds(new LatLng(lat, lng), new LatLng(lat, lng));
googleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, width, height, 20));
属性将文本添加到SVG元素。
Codepen是here
content: ();
.grade1 {
stroke: #07FF00;
stroke-width: 3;
fill: #BBFFA6;
}
.grade1::after {
content: "Grade 1";
width: 40px;
height: 40px;
}