EN
CSS - what is default flex-direction?
1 answers
0 points
Can you tell me what is default flex-direction
property value?
I can't check like this:
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
.my-element {
7
display: flex;
8
}
9
10
</style>
11
</head>
12
<body>
13
<div id="my-element">My element</div>
14
</body>
15
<script>
16
17
var myElement = document.querySelector('#my-element');
18
19
console.log(myElement.style.flexDirection);
20
21
</script>
22
</html>
1 answer
0 points
The default value of the CSS flex-direction
property is row
.
xxxxxxxxxx
1
.my-element {
2
display: flex;
3
flex-direction: row; /* default */
4
}
References
0 commentsShow commentsAdd comment