servo/tests/wpt/css-tests/css-animations-1_dev/html/animation-name-001.htm

48 lines
No EOL
1.3 KiB
HTML

<!DOCTYPE html>
<html><head><meta charset="utf-8">
<title>CSS Animations Test: animation-name - blank value</title>
<link href="http://www.nokia.com" rel="author" title="Nokia Inc.">
<link href="http://www.intel.com" rel="author" title="Intel">
<link href="mailto:zhiqiang.zhang@intel.com" rel="reviewer" title="Zhiqiang Zhang"> <!-- 2015-05-06 -->
<link href="https://drafts.csswg.org/css-animations-1/#animation-name" rel="help">
<link href="https://drafts.csswg.org/css-animations-1/#animation-duration" rel="help">
<meta content="animated" name="flags">
<meta content="Check that animation-name is set without any value,
there will be no animation." name="assert">
<style>
div {
animation-name: ;
animation-duration: 8s;
background-color: blue;
height: 100px;
width: 100px;
position: relative;
}
@keyframes sample {
from {
left: 150px;
}
to {
left: 0px;
}
}
</style>
</head><body>
<p>
Test passes if there is a filled blue square with 'Filler Text',
which starts staying left about 2 seconds, then moves from right to left.
</p>
<div>Filler Text</div>
<script>
setTimeout(setAnimationName, 2000);
function setAnimationName () {
var div = document.getElementsByTagName("div");
div[0].style.animationName = "sample";
}
</script>
</body></html>