I want to draw a dashed line on straight line

i tried but (Example)

* {
   stroke: yellow, red;
  :nth-stroke(1) {
     dasharry 5 2
   :nth-stroke(2) {
  • 1
    Welcome to GIS SE! As a new user be sure to take the Tour to learn about our focused Q&A format. Specifically it would be helpful if you explained what happened when you implemented your attempted solution - error messages etc.
    – RoperMaps
    Aug 24, 2017 at 8:17

1 Answer 1


The CSS Cookbook shows an example of this

* {
   stroke: blue;
   stroke-width: 3px;
   stroke-dasharray: 5 2;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.