column-rule-style



значения свойства:


  • none
  • hidden
  • dotted
  • dashed
  • solid
  • double
  • groove
  • ridge
  • inset
  • outset



css/style.css
  • * {
  •  margin: 0;
  •  padding: 0;
  • }
  •  
  • .main {
  •  height: 600px;
  •  width: 900px;
  •  position: absolute;
  •  top: 50%;
  •  left: 50%;
  •  margin-top: -300px;
  •  margin-left: -450px;
  • }
  •  
  • .wrapper {
  •  width: 100%;
  •  height: 33.3%;
  •  float: left;
  • }
  •  
  • #div1, #div2, #div3 {
  •  height: 150px;
  •  width: 800px;
  •  float: left;
  •  position: relative;
  •  top: 50%;
  •  left: 50%;
  •  margin-top: -85px;
  •  margin-left: -410px;
  •  border: 1px solid;
  •  text-align: justify;
  •  padding: 5px;
  •  column-count: 3;
  •  -moz-column-count: 3;
  •  -webkit-column-count: 3;
  •  column-rule-color: #00F;
  •  -moz-column-rule-color: #00F;
  •  -webkit-column-rule-color: #00F;
  •  column-rule-width: 3px;
  •  -moz-column-rule-width: 3px;
  •  -webkit-column-rule-width: 3px;
  • }
  •  
  • #div1 {
  •  column-rule-style: solid;
  •  -moz-column-rule-style: solid;
  •  -webkit-column-rule-style: solid;
  • }
  •  
  • #div2 {
  •  -moz-column-rule-style: dotted;
  •  -webkit-column-rule-style: dotted;
  • }
* {
 margin: 0;
 padding: 0;
}

.main {
 height: 600px;
 width: 900px;
 position: absolute;
 top: 50%;
 left: 50%;
 margin-top: -300px;
 margin-left: -450px;
}

.wrapper {
 width: 100%;
 height: 33.3%;
 float: left;
}

#div1, #div2, #div3 {
 height: 150px;
 width: 800px;
 float: left;
 position: relative;
 top: 50%;
 left: 50%;
 margin-top: -85px;
 margin-left: -410px;
 border: 1px solid;
 text-align: justify;
 padding: 5px;
 column-count: 3;
 -moz-column-count: 3;
 -webkit-column-count: 3;
 column-rule-color: #00F;
 -moz-column-rule-color: #00F;
 -webkit-column-rule-color: #00F;
 column-rule-width: 3px;
 -moz-column-rule-width: 3px;
 -webkit-column-rule-width: 3px;
} 

#div1 {
 column-rule-style: solid;
 -moz-column-rule-style: solid;
 -webkit-column-rule-style: solid;
}

#div2 {
 -moz-column-rule-style: dotted;
 -webkit-column-rule-style: dotted;
}


index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  •  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  • </head>
  • <body>
  •  <div class="main">
  •   <div class="wrapper">
  •    <div id="div1">
  •     I was dreaming about Hawaii. I was dreaming about my holiday. In
  •     my dream, I was on the beach in Hawaii. The hot sun was shining on
  •     my face. The sound of the sea was all around me.
  •     But it was a dream. Three weeks ago, I had been lying on a beach
  •     in Hawaii. But I was not in Hawaii now. I was dreaming in my office
  •     in Los Angeles. I had returned from my holiday and there was no
  •     work for me. Nobody wanted to hire me. I went to my office every
  •     day, but the telephone didn't ring. So I slept in my chair and I dreamt
  •     about Hawaii.
  •    </div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div2">
  •     I was dreaming about Hawaii. I was dreaming about my holiday. In
  •     my dream, I was on the beach in Hawaii. The hot sun was shining on
  •     my face. The sound of the sea was all around me.
  •     But it was a dream. Three weeks ago, I had been lying on a beach
  •     in Hawaii. But I was not in Hawaii now. I was dreaming in my office
  •     in Los Angeles. I had returned from my holiday and there was no
  •     work for me. Nobody wanted to hire me. I went to my office every
  •     day, but the telephone didn't ring. So I slept in my chair and I dreamt
  •     about Hawaii.
  •    </div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div3">
  •     I was dreaming about Hawaii. I was dreaming about my holiday. In
  •     my dream, I was on the beach in Hawaii. The hot sun was shining on
  •     my face. The sound of the sea was all around me.
  •     But it was a dream. Three weeks ago, I had been lying on a beach
  •     in Hawaii. But I was not in Hawaii now. I was dreaming in my office
  •     in Los Angeles. I had returned from my holiday and there was no
  •     work for me. Nobody wanted to hire me. I went to my office every
  •     day, but the telephone didn't ring. So I slept in my chair and I dreamt
  •     about Hawaii.
  •    </div>
  •   </div>
  •  </div>
  • <script>
  •  /*JavaScript*/
  •  document.getElementById("div2").style.columnRuleStyle="dotted";
  •  /*jQuery*/
  •  $(document).ready(function() {
  •   $("#div3").css({ "column-rule-style": "dashed" });
  •   $("#div3").css({ "-moz-column-rule-style": "dashed" });
  •   $("#div3").css({ "-webkit-column-rule-style": "dashed" });
  •  });
  • </script>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  •  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  • </head>
  • <body>
  •  <div class="main">
  •   <div class="wrapper">
  •    <div id="div1">
  •     I was dreaming about Hawaii. I was dreaming about my holiday. In
  •     my dream, I was on the beach in Hawaii. The hot sun was shining on
  •     my face. The sound of the sea was all around me.
  •     But it was a dream. Three weeks ago, I had been lying on a beach
  •     in Hawaii. But I was not in Hawaii now. I was dreaming in my office
  •     in Los Angeles. I had returned from my holiday and there was no
  •     work for me. Nobody wanted to hire me. I went to my office every
  •     day, but the telephone didn't ring. So I slept in my chair and I dreamt
  •     about Hawaii.
  •    </div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div2">
  •     I was dreaming about Hawaii. I was dreaming about my holiday. In
  •     my dream, I was on the beach in Hawaii. The hot sun was shining on
  •     my face. The sound of the sea was all around me.
  •     But it was a dream. Three weeks ago, I had been lying on a beach
  •     in Hawaii. But I was not in Hawaii now. I was dreaming in my office
  •     in Los Angeles. I had returned from my holiday and there was no
  •     work for me. Nobody wanted to hire me. I went to my office every
  •     day, but the telephone didn't ring. So I slept in my chair and I dreamt
  •     about Hawaii.
  •    </div>
  •   </div>
  •   <div class="wrapper">
  •    <div id="div3">
  •     I was dreaming about Hawaii. I was dreaming about my holiday. In
  •     my dream, I was on the beach in Hawaii. The hot sun was shining on
  •     my face. The sound of the sea was all around me.
  •     But it was a dream. Three weeks ago, I had been lying on a beach
  •     in Hawaii. But I was not in Hawaii now. I was dreaming in my office
  •     in Los Angeles. I had returned from my holiday and there was no
  •     work for me. Nobody wanted to hire me. I went to my office every
  •     day, but the telephone didn't ring. So I slept in my chair and I dreamt
  •     about Hawaii.
  •    </div>
  •   </div>
  •  </div>
  • <script>
  •  /*JavaScript*/
  •  document.getElementById("div2").style.columnRuleStyle="dotted";
  •  /*jQuery*/
  •  $(document).ready(function() {
  •   $("#div3").css({ "column-rule-style": "dashed" });
  •   $("#div3").css({ "-moz-column-rule-style": "dashed" });
  •   $("#div3").css({ "-webkit-column-rule-style": "dashed" });
  •  });
  • </script>
  • </body>
  • </html>