You can use javascript. As the link you have provided changes width of the div
i.e. #intro1
and changes width, font-size, etc of other child elements inside it to show a specific responsive design. What you can do is
To make responsive for tablet:
Create a button showing tablet icon and on clicking that button you can run a function
eg:
function showTablet () {
// first make #intro1 width to tablet device width
var tabletDiv = document.querySelector("#intro1");
tabletDiv.style.width = "1020px";
// Get child Elements and add css according to your responsive need
// eg
var childElement1 = document.querySelector('.just-example-child-element');
childElement1.style.width = "50%";
childElement1.style.fontSize = "15px";
childElement1.style.margin = "15px";
// you can also add class to child elements according to your responsive design layout
// eg
var childElement2 = document.querySelector(".just-another-example-child-element");
childElement2.className = "tablet-class";
// And so on
}
To make responsive for mobile:
Create a button showing mobile icon and on clicking that button you can run a function
eg:
function showMobile () {
// first make #intro1 width to mobile device width
var mobileDiv= document.querySelector('#intro1');
mobileDiv.style.width = "356px";
// Get child Elements and add css according to your responsive need
// eg
var childElement1 = document.querySelector(".just-example-child-element");
childElement1.style.width = "50%";
childElement1.style.fontSize = "15px";
childElement1.style.margin = "15px";
// And so on
}