placeholder code example

Example 1: css placeholder color

::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  color: pink;
}
::-moz-placeholder { /* Firefox 19+ */
  color: pink;
}
:-ms-input-placeholder { /* IE 10+ */
  color: pink;
}
:-moz-placeholder { /* Firefox 18- */
  color: pink;
}

Example 2: json placeholder

fetch('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => response.json())
  .then(json => console.log(json))

Example 3: json placeholder

axios
      .get("https://jsonplaceholder.typicode.com/posts")
      .then(function (response) {
    	 console.log(response);
      })
      .catch(function (error) {
        // handle error
        console.log(error);
      })
      .then(function () {
        // always executed
      });

Example 4: placeholder

<input type="text" value="Amsterdam,Washington,Sydney,Beijing,Cairo" data-role="tagsinput" placeholder="sdafdsa" />

Example 5: create transparent placeholder img

from PIL import Image
img = Image.new('RGB', (32,32), color='white')
img.save('empty.png')
quit()

Example 6: input text hint

placeholder="123-45-678"